summaryrefslogtreecommitdiff
path: root/ext/zip
diff options
context:
space:
mode:
authorFelipe Pena <felipensp@gmail.com>2013-10-20 09:50:13 -0200
committerFelipe Pena <felipensp@gmail.com>2013-10-20 09:50:13 -0200
commit8aa19c9fd8bcccd76d5246064fd4eab4e4b5c4f2 (patch)
tree37e2984c4e288f6f40e8840ea99622ecaeb4254d /ext/zip
parent5b0560efc3e803cdb59d161cb3cd660e388b211f (diff)
parent9976b5cd7f36d90b49d1dcf58ec6497f0e592b7d (diff)
downloadphp-git-8aa19c9fd8bcccd76d5246064fd4eab4e4b5c4f2.tar.gz
Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4: - Moved NULL check before dereferencing
Diffstat (limited to 'ext/zip')
-rw-r--r--ext/zip/php_zip.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c
index a9f977c9fd..d3ec27bafe 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) {