mirror of
https://github.com/php/php-src.git
synced 2026-04-28 02:33:17 +02:00
- Fix possible buffer overflow. Always better to use strlcpy() instead
of strncpy()
This commit is contained in:
+1
-1
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user