[prev in list] [next in list] [prev in thread] [next in thread]
List: php-cvs
Subject: [PHP-CVS] com php-src: Merge branch 'PHP-5.5' into PHP-5.6: ext/phar/dirstream.c ext/phar/util.c ext
From: Ferenc Kovacs <tyrael () php ! net>
Date: 2015-09-29 23:32:05
Message-ID: php-mail-0472bccdfea95e0eb293828b8b44f1741420967998 () git ! php ! net
[Download RAW message or body]
Commit: a8dfa57571afbe815f213f1fe74ee1f8704e408a
Author: Stanislav Malyshev <stas@php.net> Mon, 28 Sep 2015 21:42:08 -0700
Committer: Ferenc Kovacs <tyrael@php.net> Wed, 30 Sep 2015 01:32:05 +0200
Parents: 752e4c6c07aee71dbb6f277cc41a417e025e9f9e
Branches: PHP-5.6.14
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a8dfa57571afbe815f213f1fe74ee1f8704e408a
Log:
Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
Better fix for bug #70433
Conflicts:
ext/phar/dirstream.c
Bugs:
https://bugs.php.net/70433
Changed paths:
M ext/phar/dirstream.c
M ext/phar/util.c
M ext/phar/zip.c
Diff:
diff --git a/ext/phar/dirstream.c b/ext/phar/dirstream.c
index e6926ce..e863509 100644
--- a/ext/phar/dirstream.c
+++ b/ext/phar/dirstream.c
@@ -198,7 +198,7 @@ static php_stream *phar_make_dirstream(char *dir, HashTable \
*manifest TSRMLS_DC) zend_hash_internal_pointer_reset(manifest);
while (FAILURE != zend_hash_has_more_elements(manifest)) {
- if (HASH_KEY_IS_STRING != zend_hash_get_current_key_ex(manifest, &str_key, \
&keylen, &unused, 0, NULL)) { + if (HASH_KEY_NON_EXISTENT == \
zend_hash_get_current_key_ex(manifest, &str_key, &keylen, &unused, 0, NULL)) { \
break; }
diff --git a/ext/phar/util.c b/ext/phar/util.c
index 461cbf9..da5a6c1 100644
--- a/ext/phar/util.c
+++ b/ext/phar/util.c
@@ -1970,7 +1970,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;
}
}
diff --git a/ext/phar/zip.c b/ext/phar/zip.c
index 222011a..f1126a0 100644
--- a/ext/phar/zip.c
+++ b/ext/phar/zip.c
@@ -396,7 +396,9 @@ foundit:
if (entry.filename[entry.filename_len - 1] == '/') {
entry.is_dir = 1;
- entry.filename_len--;
+ if(entry.filename_len > 1) {
+ entry.filename_len--;
+ }
entry.flags |= PHAR_ENT_PERM_DEF_DIR;
} else {
entry.is_dir = 0;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic