]> granicus.if.org Git - php/commitdiff
Fix for bug #72513
authorStanislav Malyshev <stas@php.net>
Wed, 13 Jul 2016 04:52:27 +0000 (21:52 -0700)
committerAnatol Belski <ab@php.net>
Tue, 19 Jul 2016 15:18:24 +0000 (17:18 +0200)
This is applicable to 7 as well, but was somehow missing from the merge.

Zend/zend_virtual_cwd.c

index 965a59aa7593ebd7ede7af9eb908600b28373b11..4dbbb5ea5b0e7fdfaccf18e6ae49b358bb3f5322 100644 (file)
@@ -1187,7 +1187,7 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
        int add_slash;
        void *tmp;
 
-       if (path_length == 0 || path_length >= MAXPATHLEN-1) {
+       if (path_length <= 0 || path_length >= MAXPATHLEN-1) {
 #ifdef ZEND_WIN32
                _set_errno(EINVAL);
 #else