changed from strncpy to strlcpy on request

This commit is contained in:
Hartmut Holzgraefe 2003-02-27 10:21:32 +00:00
parent 60dcebd71a
commit 52ca521b40

View File

@ -298,8 +298,7 @@ static int php_foreach_cat (int instatus, char *inkey, int inkeylen, char *inval
if (inkeylen) {
char *key = emalloc(inkeylen+1);
if(key) {
strncpy(key, inkey, inkeylen);
key[inkeylen] = '\0';
strlcpy(key, inkey, inkeylen+1);
add_assoc_stringl_ex((zval *) indata, key, inkeylen+1, inval, invallen, 1);
efree(key);
} else {