mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Reuse delivered length
Fix length calculation
This commit is contained in:
parent
14628f1c5d
commit
248c857a31
1 changed files with 2 additions and 2 deletions
|
@ -774,7 +774,7 @@ __forceinline static ssize_t php_win32_ioutil_readlink(const char *path, char *b
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret_buf = php_win32_ioutil_conv_w_to_any(retw, PHP_WIN32_CP_IGNORE_LEN, &ret_buf_len);
|
ret_buf = php_win32_ioutil_conv_w_to_any(retw, ret, &ret_buf_len);
|
||||||
if (!ret_buf || ret_buf_len >= buf_len || ret_buf_len >= MAXPATHLEN) {
|
if (!ret_buf || ret_buf_len >= buf_len || ret_buf_len >= MAXPATHLEN) {
|
||||||
free(pathw);
|
free(pathw);
|
||||||
SET_ERRNO_FROM_WIN32_CODE(ERROR_BAD_PATHNAME);
|
SET_ERRNO_FROM_WIN32_CODE(ERROR_BAD_PATHNAME);
|
||||||
|
@ -784,7 +784,7 @@ __forceinline static ssize_t php_win32_ioutil_readlink(const char *path, char *b
|
||||||
|
|
||||||
free(pathw);
|
free(pathw);
|
||||||
|
|
||||||
return ret;
|
return ret_buf_len;
|
||||||
}/*}}}*/
|
}/*}}}*/
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue