]> granicus.if.org Git - php/commitdiff
MFH: Fix handling of empty settings
authorMarcus Boerger <helly@php.net>
Wed, 16 Jul 2003 20:56:06 +0000 (20:56 +0000)
committerMarcus Boerger <helly@php.net>
Wed, 16 Jul 2003 20:56:06 +0000 (20:56 +0000)
ext/dba/libinifile/inifile.c

index e9941244af1a1b8b7eb8437e441404af3a469c90..0f9a3d94b3704d110b089b9b3e1fd4ed4a4a1159 100644 (file)
@@ -154,7 +154,7 @@ static char *etrim(const char *str)
                return NULL;
        }
        val = (char*)str;
-       while (strchr(" \t\r\n", *val)) {
+       while (*val && strchr(" \t\r\n", *val)) {
                val++;
        }
        l = strlen(val);