From: Antony Dovgal Date: Wed, 9 Jul 2008 14:15:41 +0000 (+0000) Subject: add zero-terminator to the delimiter (and make valgrind happy) X-Git-Tag: php-5.3.0alpha1~420 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ae7eff10e8e70df904d3a47714dc7f321fb6da95;p=php add zero-terminator to the delimiter (and make valgrind happy) --- diff --git a/ext/phar/phar.c b/ext/phar/phar.c index d984fcd631..0a6a7f86d1 100644 --- a/ext/phar/phar.c +++ b/ext/phar/phar.c @@ -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 */