mirror of
https://github.com/php/php-src.git
synced 2024-11-30 05:13:56 +08:00
- Fix possible buffer overflow. Always better to use strlcpy() instead
of strncpy()
This commit is contained in:
parent
5aec595716
commit
0ac0f656ae
@ -444,7 +444,7 @@ static size_t _php_curl_passwd(void *ctx, char *prompt, char *buf, int buflen)
|
||||
return -1;
|
||||
}
|
||||
|
||||
strncpy(buf, Z_STRVAL_P(retval), Z_STRLEN_P(retval));
|
||||
strlcpy(buf, Z_STRVAL_P(retval), buflen);
|
||||
|
||||
zval_ptr_dtor(&argv[0]);
|
||||
zval_ptr_dtor(&argv[1]);
|
||||
|
Loading…
Reference in New Issue
Block a user