Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_operators.c
| From: | Andi Gutmans | Date: | Sun, 22 Feb 2004 20:05:01 +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-2389@lists.php.net to get a copy of this message | ||
Huh? What platform crashes? Can you send reproducible C code?
Thanks,
Andi
At 20:02 22/02/2004 +0000, Derick Rethans wrote:
derick Sun Feb 22 15:02:28 2004 EDTModified files:/ZendEngine2 zend_operators.cLog: - Fixed bug #27354 (Modulus operator crashes PHP). http://cvs.php.net/diff.php/ZendEngine2/zend_operators.c?r1=1.175&r2=1.176&ty=u Index: ZendEngine2/zend_operators.c diff -u ZendEngine2/zend_operators.c:1.175 ZendEngine2/zend_operators.c:1.176 --- ZendEngine2/zend_operators.c:1.175 Sat Jan 10 07:48:04 2004+++ ZendEngine2/zend_operators.c Sun Feb 22 15:02:26 2004@@ -17,7 +17,7 @@+----------------------------------------------------------------------+*/ -/* $Id: zend_operators.c,v 1.175 2004/01/10 12:48:04 zeev Exp $ */ +/* $Id: zend_operators.c,v 1.176 2004/02/22 20:02:26 derick Exp $ */ #include <ctype.h> @@ -836,6 +836,11 @@return FAILURE; /* modulus by zero */ }+ if (abs(op2->value.lval) == 1) { + ZVAL_LONG(result, 0); + return SUCCESS; + }+result->type = IS_LONG; result->value.lval = op1->value.lval % op2->value.lval; return SUCCESS;-- Zend Engine CVS Mailing List (http://cvs.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php