mirror of
https://github.com/php/php-src.git
synced 2024-11-28 20:34:29 +08:00
Fixed bug #76947 file_put_contents() blocks the directory of the file (__DIR__)
The condition was wrong. The target buffer size only matters, when some output is going to be copied into it.
This commit is contained in:
parent
a42801abe3
commit
8209a8821c
@ -481,11 +481,6 @@ __forceinline static char *php_win32_ioutil_getcwd(char *buf, size_t len)
|
||||
size_t tmp_bufa_len;
|
||||
DWORD err = 0;
|
||||
|
||||
if (len > PHP_WIN32_IOUTIL_MAXPATHLEN) {
|
||||
SET_ERRNO_FROM_WIN32_CODE(ERROR_BAD_LENGTH);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (php_win32_ioutil_getcwd_w(tmp_bufw, len ? len : PHP_WIN32_IOUTIL_MAXPATHLEN) == NULL) {
|
||||
err = GetLastError();
|
||||
SET_ERRNO_FROM_WIN32_CODE(err);
|
||||
|
Loading…
Reference in New Issue
Block a user