cvs: ZendEngine2 / zend_API.c

From: Date: Sun, 24 Aug 2003 18:47:11 +0000
Subject: cvs: ZendEngine2 / zend_API.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-1701@lists.php.net to get a copy of this message
helly Sun Aug 24 14:47:11 2003 EDT Modified files: /ZendEngine2 zend_API.c Log: Fix memory source of string duplication for non internal properties Index: ZendEngine2/zend_API.c diff -u ZendEngine2/zend_API.c:1.209 ZendEngine2/zend_API.c:1.210 --- ZendEngine2/zend_API.c:1.209 Sun Aug 24 13:32:47 2003 +++ ZendEngine2/zend_API.c Sun Aug 24 14:47:11 2003 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_API.c,v 1.209 2003/08/24 17:32:47 helly Exp $ */ +/* $Id: zend_API.c,v 1.210 2003/08/24 18:47:11 helly Exp $ */ #include "zend.h" #include "zend_execute.h" @@ -1708,11 +1708,12 @@ if (ce->type & ZEND_INTERNAL_CLASS) { property = malloc(sizeof(zval)); + ZVAL_STRINGL(property, zend_strndup(value, len), len, 0); } else { ALLOC_ZVAL(property); + ZVAL_STRINGL(property, value, len, 1); } INIT_PZVAL(property); - ZVAL_STRINGL(property, zend_strndup(value, len), len, 0); return zend_declare_property(ce, name, name_length, property, access_type); }

« previous php.zend-engine.cvs (#1701) next »