]> granicus.if.org Git - php/commitdiff
Added overflow comment from div_function
authorMatt Wilmas <mattwil@php.net>
Tue, 17 Feb 2009 15:14:48 +0000 (15:14 +0000)
committerMatt Wilmas <mattwil@php.net>
Tue, 17 Feb 2009 15:14:48 +0000 (15:14 +0000)
Zend/zend_operators.c

index da735a18b5df4329599564d3fe27e75bd77c1a76..02b42cb1f6c0047761b589d365ff301474107da6 100644 (file)
@@ -1524,6 +1524,7 @@ ZEND_API int mod_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ *
        }
 
        if (Z_LVAL_P(op2) == -1) {
+               /* Prevent overflow error/crash if op1==LONG_MIN */
                ZVAL_LONG(result, 0);
                return SUCCESS;
        }