diff options
author | Felipe Pena <felipensp@gmail.com> | 2013-10-20 09:50:17 -0200 |
---|---|---|
committer | Felipe Pena <felipensp@gmail.com> | 2013-10-20 09:50:17 -0200 |
commit | 048923b3c6bec8a7aed97015e8a3597ae1898b3d (patch) | |
tree | 7f731860a05ed01a21485e7a1989fa11b68fbab2 /ext/zip/php_zip.c | |
parent | d23f089fb94b8a3fec07d58a6801fe078c32dd3e (diff) | |
parent | 8aa19c9fd8bcccd76d5246064fd4eab4e4b5c4f2 (diff) | |
download | php-git-048923b3c6bec8a7aed97015e8a3597ae1898b3d.tar.gz |
Merge branch 'PHP-5.5'
* PHP-5.5:
- Moved NULL check before dereferencing
Diffstat (limited to 'ext/zip/php_zip.c')
-rw-r--r-- | ext/zip/php_zip.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index e69ef30bb3..0b8f3fcad3 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) { |