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

index e272b56d4842f78a56325f373ed796c115d3155f..075d03cf5553d95364946aa23322565d8b35d590 100644 (file)
@@ -158,7 +158,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);