cvs: ZendEngine2 / zend_compile.c
| From: | Antony Dovgal | Date: | Thu, 08 Jan 2009 22:35:30 +0000 |
| Subject: | cvs: ZendEngine2 / zend_compile.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-7316@lists.php.net to get a copy of this message | ||
tony2001 Thu Jan 8 22:35:30 2009 UTC
Modified files:
/ZendEngine2 zend_compile.c
Log:
use correct check for constants and stop segfaulting
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_compile.c?r1=1.846&r2=1.847&diff_format=u
Index: ZendEngine2/zend_compile.c
diff -u ZendEngine2/zend_compile.c:1.846 ZendEngine2/zend_compile.c:1.847
--- ZendEngine2/zend_compile.c:1.846 Wed Dec 31 11:12:28 2008
+++ ZendEngine2/zend_compile.c Thu Jan 8 22:35:30 2009
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_compile.c,v 1.846 2008/12/31 11:12:28 sebastian Exp $ */
+/* $Id: zend_compile.c,v 1.847 2009/01/08 22:35:30 tony2001 Exp $ */
#include <zend_language_parser.h>
#include "zend.h"
@@ -4868,7 +4868,7 @@
} else if (UG(unicode) && ZEND_U_EQUAL(Z_TYPE(var->u.constant),
Z_UNIVAL(var->u.constant), Z_UNILEN(var->u.constant), "encoding",
sizeof("encoding")-1)) {
UErrorCode status = U_ZERO_ERROR;
- if (Z_TYPE(val->u.constant) == IS_CONSTANT) {
+ if ((Z_TYPE(val->u.constant) & IS_CONSTANT_TYPE_MASK) == IS_CONSTANT) {
zend_error(E_COMPILE_ERROR, "Cannot use constants as encoding");
}
/*