X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Ftools.c;h=21c1ce91eaef46358cad439e41c3d2bfb92d872f;hb=007bbcbb07600e1d40cc90df3ddf788f8312b7d9;hp=3a457ae6efc072a71c87bfa325699e6049df0bd0;hpb=179eb2be9a0322403c50f4a66ed73e5d317ca189;p=citadel.git diff --git a/citadel/tools.c b/citadel/tools.c index 3a457ae6e..21c1ce91e 100644 --- a/citadel/tools.c +++ b/citadel/tools.c @@ -388,7 +388,7 @@ void striplt(char *buf) { while ((strlen(buf) > 0) && (isspace(buf[0]))) strcpy(buf, &buf[1]); - while (isspace(buf[strlen(buf) - 1])) + while ((strlen(buf) > 0) && (isspace(buf[strlen(buf) - 1]))) buf[strlen(buf) - 1] = 0; }