File php-CVE-2016-6289.patch of Package php7.15211

X-Git-Url: http://72.52.91.13:8000/?p=php-src.git;a=blobdiff_plain;f=Zend%2Fzend_virtual_cwd.c;h=84a3508ded09dbfdc7a91a28968948d81bb99e26;hp=c8e42ddc60baef619d555f474d631dda5cc691e1;hb=a099545bec28c7ebe1641c8a45b68709901f6893;hpb=0ca1698cf961d7064deb4c4598048bdca4af0b56

Index: php-7.0.7/Zend/zend_virtual_cwd.c
===================================================================
--- php-7.0.7.orig/Zend/zend_virtual_cwd.c	2016-08-03 11:02:55.907384290 +0200
+++ php-7.0.7/Zend/zend_virtual_cwd.c	2016-08-03 11:04:32.720925188 +0200
@@ -1186,7 +1186,7 @@ CWD_API int virtual_file_ex(cwd_state *s
 	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
openSUSE Build Service is sponsored by