com php-src: backported patch for bug #69472: NEWS TSRM/tsrm_ virtual_cwd.c
| From: | Anatol Belski | Date: | Tue, 28 Apr 2015 13:31:47 +0000 |
| Subject: | com php-src: backported patch for bug #69472: NEWS TSRM/tsrm_ virtual_cwd.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-86541@lists.php.net to get a copy of this message | ||
Commit: 3cd3881574b5b3c4e730d8be5d757a8bc8f374fa
Author: Anatol Belski <ab@php.net> Tue, 28 Apr 2015 15:31:47 +0200
Parents: 1c7a902d8adc546bf81b0d9cdd42fcce139e18c3
Branches: PHP-5.5 PHP-5.6 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=3cd3881574b5b3c4e730d8be5d757a8bc8f374fa
Log:
backported patch for bug #69472
Bugs:
https://bugs.php.net/69472
Changed paths:
M NEWS
M TSRM/tsrm_virtual_cwd.c
Diff:
diff --git a/NEWS b/NEWS
index b0e9007..aa414fb 100644
--- a/NEWS
+++ b/NEWS
@@ -13,6 +13,8 @@ PHP NEWS
. Fixed bug #68652 (segmentation fault in destructor). (Dmitry)
. Fixed bug #69419 (Returning compatible sub generator produces a warning).
(Nikita)
+ . Fixed bug #69472 (php_sys_readlink ignores misc errors from
+ GetFinalPathNameByHandleA). (Jan Starke)
- ODBC:
. Fixed bug #69474 (ODBC: Query with same field name from two tables returns
diff --git a/TSRM/tsrm_virtual_cwd.c b/TSRM/tsrm_virtual_cwd..c
index 2d97844..ba92711 100644
--- a/TSRM/tsrm_virtual_cwd.c
+++ b/TSRM/tsrm_virtual_cwd.c
@@ -251,7 +251,7 @@ CWD_API int php_sys_readlink(const char *link, char *target, size_t target_len){
}
dwRet = pGetFinalPathNameByHandle(hFile, target, MAXPATHLEN, VOLUME_NAME_DOS);
- if(dwRet >= MAXPATHLEN) {
+ if(dwRet >= MAXPATHLEN || dwRet == 0) {
return -1;
}