diff options
author | Rasmus Lerdorf <rasmus@php.net> | 2013-11-07 07:55:26 -0800 |
---|---|---|
committer | Rasmus Lerdorf <rasmus@php.net> | 2013-11-07 07:55:26 -0800 |
commit | 8cb128159d07d80aaf751b252a94ff63d7f6ae06 (patch) | |
tree | 1d8ebb09facf44bbf6a406ab681e537f6643e089 /ext/zip/php_zip.c | |
parent | f0c926564c5f7de9462d9ca7bd75014b14a63f56 (diff) | |
parent | 8b6b39fdcffc8486fedd391b8d8aa7700f0c7f93 (diff) | |
download | php-git-8cb128159d07d80aaf751b252a94ff63d7f6ae06.tar.gz |
Merge branch 'PHP-5.4' of git.php.net:php-src into PHP-5.4
* 'PHP-5.4' of git.php.net:php-src: (65 commits)
Add a couple more test cases to parse_url() tests
fix missing change from 'tcp_socket' to the more common 'server'
fix many parallel test issues
Cleanup temp test file
Fixed Bug #66034 (Segmentation Fault when constructor of PDO statement throws an exception)
Typo fix: umknown -> unknown
Fix bug #66008
5.4.23-dev
Update NEWS
Fixed Bug 64760 var_export() does not use full precision for floating-point numbers
add bundled libzip LICENSE, as required by BSD License terms
- Updated to version 2013.8 (2013h)
remove "PHP 6" staff
Fixed bug #65950 Field name truncation if the field name is bigger than 32 characters
- Updated to version 2013.7 (2013g)
Fix Coverity issue reporting wrong sizeof()
exif NEWS
add tests for bug #62523
Merged PR #293 (Exif crash on unknown encoding was fixed) By: Draal Conflicts: configure.in main/php_version.h
Just SKIP that test on travis
...
Diffstat (limited to 'ext/zip/php_zip.c')
-rw-r--r-- | ext/zip/php_zip.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index d7bd5f49e6..1f435bbb00 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -102,14 +102,14 @@ static char * php_zip_make_relative_path(char *path, int path_len) /* {{{ */ char *path_begin = path; size_t i; - if (IS_SLASH(path[0])) { - return path + 1; - } - if (path_len < 1 || path == NULL) { return NULL; } + if (IS_SLASH(path[0])) { + return path + 1; + } + i = path_len; while (1) { @@ -1856,15 +1856,16 @@ static ZIPARCHIVE_METHOD(addFromString) /* TODO: fix _zip_replace */ if (cur_idx >= 0) { if (zip_delete(intern, cur_idx) == -1) { - RETURN_FALSE; + goto fail; } } - if (zip_add(intern, name, zs) == -1) { - RETURN_FALSE; - } else { + if (zip_add(intern, name, zs) != -1) { RETURN_TRUE; } +fail: + zip_source_free(zs); + RETURN_FALSE; } /* }}} */ |