Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_operators.c

From: Date: Sun, 10 Apr 2005 21:42:37 +0000
Subject: Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_operators.c
References: 1  Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-3553@lists.php.net to get a copy of this message
How about using goto instead of such an unintuitive macro? :) Moriyoshi On 2005/04/08, at 23:33, Marcus Boerger wrote:
helly Fri Apr 8 10:33:02 2005 EDT Modified files:
    /ZendEngine2	zend_operators.c
Log: - Fix memory corruption found by rob http://cvs.php.net/diff.php/ZendEngine2/zend_operators.c?r1=1.204&r2=1.205&ty=u Index: ZendEngine2/zend_operators.c diff -u ZendEngine2/zend_operators.c:1.204 ZendEngine2/zend_operators.c:1.205 --- ZendEngine2/zend_operators.c:1.204 Mon Dec 13 04:09:06 2004 +++ ZendEngine2/zend_operators.c Fri Apr 8 10:33:00 2005 @@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
*/ -/* $Id: zend_operators.c,v 1.204 2004/12/13 09:09:06 derick Exp $ */ +/* $Id: zend_operators.c,v 1.205 2005/04/08 14:33:00 helly Exp $ */ #include <ctype.h> @@ -1281,24 +1281,26 @@ } #define COMPARE_RETURN_AND_FREE(retval) \ - zend_free_obj_get_result(op1, free_op1); \ - zend_free_obj_get_result(op2, free_op2); \ + zend_free_obj_get_result(op1_orig, free_op1); \ + zend_free_obj_get_result(op2_orig, free_op2); \ return retval; ZEND_API int compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) { zval op1_copy, op2_copy; zend_bool free_op1 = 0, free_op2 = 0; + zval *op1_orig, *op2_orig; if (op1->type == IS_OBJECT && Z_OBJ_HT_P(op1)->get) { op1 = Z_OBJ_HT_P(op1)->get(op1 TSRMLS_CC); free_op1 = 1; } + op1_orig = op1; if (op2->type == IS_OBJECT && Z_OBJ_HT_P(op2)->get) { op2 = Z_OBJ_HT_P(op2)->get(op2 TSRMLS_CC); free_op2 = 1; } - + op2_orig = op2; if ((op1->type == IS_NULL && op2->type == IS_STRING) || (op2->type == IS_NULL && op1->type == IS_STRING)) { --Zend Engine CVS Mailing List (http://cvs.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


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