Hi Derick,

Attached is a very simple patch for Bug #40115 (possibly wrong numeric
string comparison caused by overflow) if you want to fix it in 4.4. :-)


Matt


----- Original Message ----- 
From: "Derick Rethans"
Sent: Tuesday, February 20, 2007

> Hello!
>
> there is a critical issues in PHP 4.4.5:
> - when register_globals = On, sessions don't work correctly (segfaults).
>
> Because of this I'd like to release a 4.4.6 soon with this fixes. As
> there is also an upgrade to pcre 7.0 we'd need atleast one RC, which I
> plan to release on Thursday.
>
> Any opinions?
>
> regards,
> Derick
Index: zend_operators.c
===================================================================
RCS file: /repository/Zend/Attic/zend_operators.c,v
retrieving revision 1.129.2.10.2.2
diff -u -r1.129.2.10.2.2 zend_operators.c
--- zend_operators.c    3 Oct 2006 17:55:40 -0000       1.129.2.10.2.2
+++ zend_operators.c    18 Jan 2007 10:53:59 -0000
@@ -1737,8 +1737,7 @@
                        result->value.lval = 
ZEND_NORMALIZE_BOOL(result->value.dval);
                        result->type = IS_LONG;
                } else { /* they both have to be long's */
-                       result->value.lval = lval1 - lval2;
-                       result->value.lval = 
ZEND_NORMALIZE_BOOL(result->value.lval);
+                       result->value.lval = lval1 > lval2 ? 1 : (lval1 < lval2 
? -1 : 0);
                        result->type = IS_LONG;
                }
        } else {

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to