hholzgra Thu Feb 27 05:21:32 2003 EDT
Modified files:
/php4/ext/yp yp.c
Log:
changed from strncpy to strlcpy on request
Index: php4/ext/yp/yp.c
diff -u php4/ext/yp/yp.c:1.36 php4/ext/yp/yp.c:1.37
--- php4/ext/yp/yp.c:1.36 Wed Feb 26 11:06:06 2003
+++ php4/ext/yp/yp.c Thu Feb 27 05:21:31 2003
@@ -16,7 +16,7 @@
| Fredrik Ohrn |
+----------------------------------------------------------------------+
*/
-/* $Id: yp.c,v 1.36 2003/02/26 16:06:06 hholzgra Exp $ */
+/* $Id: yp.c,v 1.37 2003/02/27 10:21:31 hholzgra Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -298,8 +298,7 @@
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 {
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php