From: Hartmut Holzgraefe Date: Thu, 27 Feb 2003 10:21:32 +0000 (+0000) Subject: changed from strncpy to strlcpy on request X-Git-Tag: RELEASE_0_5~719 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=52ca521b40b9c0806dad2809a22fc8efec0b87e0;p=php changed from strncpy to strlcpy on request --- 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 {