diff options
author | Felipe Pena <felipensp@gmail.com> | 2013-10-20 09:50:11 -0200 |
---|---|---|
committer | Felipe Pena <felipensp@gmail.com> | 2013-10-20 09:50:11 -0200 |
commit | 9976b5cd7f36d90b49d1dcf58ec6497f0e592b7d (patch) | |
tree | 9dcddd5b4d50a9ed4ca07ceb1ba2369d3b0bec64 /ext/zip | |
parent | 52555a78946cd91034f86eb4ad03c2d76cbef0cd (diff) | |
download | php-git-9976b5cd7f36d90b49d1dcf58ec6497f0e592b7d.tar.gz |
- Moved NULL check before dereferencing
Diffstat (limited to 'ext/zip')
-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 df16383d10..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) { |