summaryrefslogtreecommitdiff
path: root/ext/phar/util.c
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2015-09-28 21:37:26 -0700
committerStanislav Malyshev <stas@php.net>2015-09-28 21:41:02 -0700
commit1ddf72180a52d247db88ea42a3e35f824a8fbda1 (patch)
tree9d9410029fe73e2bb60c39900cdf3b699f677535 /ext/phar/util.c
parentf98ab19dc0c978e3caaa2614579e4a61f2c317f5 (diff)
downloadphp-git-1ddf72180a52d247db88ea42a3e35f824a8fbda1.tar.gz
Better fix for bug #70433
Diffstat (limited to 'ext/phar/util.c')
-rw-r--r--ext/phar/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/phar/util.c b/ext/phar/util.c
index e7decda9cd..303daede45 100644
--- a/ext/phar/util.c
+++ b/ext/phar/util.c
@@ -1977,7 +1977,7 @@ void phar_add_virtual_dirs(phar_archive_data *phar, char *filename, int filename
while ((s = zend_memrchr(filename, '/', filename_len))) {
filename_len = s - filename;
- if (FAILURE == zend_hash_add_empty_element(&phar->virtual_dirs, filename, filename_len)) {
+ if (!filename_len || FAILURE == zend_hash_add_empty_element(&phar->virtual_dirs, filename, filename_len)) {
break;
}
}