com php-src: Fixed outof memory (length == -1): Z end/zend_virtual_cwd.c
| From: | Xinchen Hui | Date: | Fri, 31 Oct 2014 04:25:40 +0000 |
| Subject: | com php-src: Fixed outof memory (length == -1): Z end/zend_virtual_cwd.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-82911@lists.php.net to get a copy of this message | ||
Commit: 84783ecb7ea76e88a3831b5dae3e3819347bfbcc
Author: Xinchen Hui <laruence@php.net> Fri, 31 Oct 2014 12:25:40 +0800
Parents: 10107db61ec1ac695bb7167cae49d0e1b7271b11
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=84783ecb7ea76e88a3831b5dae3e3819347bfbcc
Log:
Fixed outof memory (length == -1)
Changed paths:
M Zend/zend_virtual_cwd.c
Diff:
diff --git a/Zend/zend_virtual_cwd.c b/Zend/zend_virtual_cwd.c
index a596b7c..e340989 100644
--- a/Zend/zend_virtual_cwd.c
+++ b/Zend/zend_virtual_cwd.c
@@ -1394,7 +1394,7 @@ CWD_API int virtual_chdir(const char *path TSRMLS_DC) /* {{{ */
CWD_API int virtual_chdir_file(const char *path, int (*p_chdir)(const char *path TSRMLS_DC)
TSRMLS_DC) /* {{{ */
{
- size_t length = strlen(path);
+ int length = strlen(path);
char *temp;
int retval;
ALLOCA_FLAG(use_heap)