]> granicus.if.org Git - php/commitdiff
Use strlcpy() rather then strcpy()
authorIlia Alshanetsky <iliaa@php.net>
Wed, 21 Feb 2007 03:59:05 +0000 (03:59 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Wed, 21 Feb 2007 03:59:05 +0000 (03:59 +0000)
ext/standard/html.c

index 5da3eaae07f17227f790404cf57997b9ee16362a..5284e543f27170405b8b969fd1b2216aab9e936f 100644 (file)
@@ -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++] = ';';
                        }