hholzgra Wed Feb 26 11:06:07 2003 EDT
Modified files:
/php4/ext/yp yp.c
Log:
changed to emalloc just to be safe
Index: php4/ext/yp/yp.c
diff -u php4/ext/yp/yp.c:1.35 php4/ext/yp/yp.c:1.36
--- php4/ext/yp/yp.c:1.35 Mon Feb 24 08:35:06 2003
+++ php4/ext/yp/yp.c Wed Feb 26 11:06:06 2003
@@ -16,7 +16,7 @@
| Fredrik Ohrn |
+----------------------------------------------------------------------+
*/
-/* $Id: yp.c,v 1.35 2003/02/24 13:35:06 hholzgra Exp $ */
+/* $Id: yp.c,v 1.36 2003/02/26 16:06:06 hholzgra Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -296,12 +296,12 @@
if (!err)
{
if (inkeylen) {
- char *key = malloc(inkeylen+1);
+ char *key = emalloc(inkeylen+1);
if(key) {
strncpy(key, inkey, inkeylen);
key[inkeylen] = '\0';
add_assoc_stringl_ex((zval *) indata, key, inkeylen+1,
inval, invallen, 1);
- free(key);
+ efree(key);
} else {
php_error(E_WARNING, "Can't allocate %d bytes for key
buffer in yp_cat()");
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php