summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHartmut Holzgraefe <hholzgra@php.net>2003-02-27 10:21:32 +0000
committerHartmut Holzgraefe <hholzgra@php.net>2003-02-27 10:21:32 +0000
commit52ca521b40b9c0806dad2809a22fc8efec0b87e0 (patch)
tree0275861fd504c654510d9be39cbf4e1521ff7653
parent60dcebd71a10a04a73cbf9fa6f1ea1013bb3c3d1 (diff)
downloadphp-git-52ca521b40b9c0806dad2809a22fc8efec0b87e0.tar.gz
changed from strncpy to strlcpy on request
-rw-r--r--ext/yp/yp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/yp/yp.c b/ext/yp/yp.c
index cca06b17cf..28ff8e3e4f 100644
--- a/ext/yp/yp.c
+++ b/ext/yp/yp.c
@@ -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 {