mirror of
https://github.com/php/php-src.git
synced 2024-11-25 19:05:31 +08:00
changed from strncpy to strlcpy on request
This commit is contained in:
parent
60dcebd71a
commit
52ca521b40
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user