X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fstring.c;h=a485d75962af5f7a6bbb4f819aa780c812fe25ca;hb=97bf2856c6014879bd04983a3e9dfcdac1e7fe85;hp=63077267367ea08d7770e59a9e6e6b23bb4725e7;hpb=16c70f8c1b54b61c3b951b6fb220df250fe09b32;p=linux-2.6.git diff --git a/lib/string.c b/lib/string.c index 630772673..a485d7596 100644 --- a/lib/string.c +++ b/lib/string.c @@ -320,7 +320,7 @@ char *strstrip(char *s) return s; end = s + size - 1; - while (end != s && isspace(*end)) + while (end >= s && isspace(*end)) end--; *(end + 1) = '\0';