From: Ilia Alshanetsky Date: Wed, 21 Feb 2007 03:59:05 +0000 (+0000) Subject: Use strlcpy() rather then strcpy() X-Git-Tag: php-5.2.2RC1~343 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5ecffe6eb5853ef0f2f868bae75796746ed32c58;p=php Use strlcpy() rather then strcpy() --- diff --git a/ext/standard/html.c b/ext/standard/html.c index 5da3eaae07..5284e543f2 100644 --- a/ext/standard/html.c +++ b/ext/standard/html.c @@ -1138,7 +1138,7 @@ PHPAPI char *php_escape_html_entities(unsigned char *old, int oldlen, int *newle } replaced[len++] = '&'; - strcpy(replaced + len, rep); + strlcpy(replaced + len, rep, maxlen); len += l; replaced[len++] = ';'; }