]> granicus.if.org Git - php/commitdiff
add zero-terminator to the delimiter (and make valgrind happy)
authorAntony Dovgal <tony2001@php.net>
Wed, 9 Jul 2008 14:15:41 +0000 (14:15 +0000)
committerAntony Dovgal <tony2001@php.net>
Wed, 9 Jul 2008 14:15:41 +0000 (14:15 +0000)
ext/phar/phar.c

index d984fcd631f9479e222195a558aa9953559fd1d7..0a6a7f86d1b80b2618084d59602b3c6a2b7ac874 100644 (file)
@@ -102,7 +102,7 @@ static void phar_split_cache_list(TSRMLS_D)
 {
        char *tmp;
        char *key, *lasts, *end;
-       char ds[1];
+       char ds[2];
        phar_archive_data *phar;
        uint i = 0;
 
@@ -111,6 +111,7 @@ static void phar_split_cache_list(TSRMLS_D)
        }
 
        ds[0] = DEFAULT_DIR_SEPARATOR;
+       ds[1] = '\0';
        tmp = estrdup(PHAR_GLOBALS->cache_list);
 
        /* fake request startup */