summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 90b6597)
raw | patch | inline | side by side (parent: 90b6597)
author | Karl DeBisschop <kdebisschop@users.sourceforge.net> | |
Mon, 7 Oct 2002 01:34:46 +0000 (01:34 +0000) | ||
committer | Karl DeBisschop <kdebisschop@users.sourceforge.net> | |
Mon, 7 Oct 2002 01:34:46 +0000 (01:34 +0000) |
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@108 f882894a-f735-0410-b71e-b25c423dba1c
plugins/popen.c | patch | blob | history |
diff --git a/plugins/popen.c b/plugins/popen.c
index cde3c7647465ca26e7effd9cae8617a27bf86780..d056904dcd88dcc36225291024c227521888f5e4 100644 (file)
--- a/plugins/popen.c
+++ b/plugins/popen.c
rtrim (char *str, const char *tok)
{
int i = 0;
+ int j = sizeof (str);
- while (str != NULL) {
+ while (str != NULL && i < j) {
if (*(str + i) == *tok) {
sprintf (str + i, "%s", "\0");
return str;