1
0
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:
Andi Gutmans
2001-05-02 22:22:16 +00:00
parent 5aec595716
commit 0ac0f656ae
+1 -1
View File
@@ -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]);