com php-src: Fixed __COMPILER_HALT_OFFSET handling: Zend/zend_constants.c
| From: | Dmitry Stogov | Date: | Fri, 28 Feb 2014 09:15:40 +0000 |
| Subject: | com php-src: Fixed __COMPILER_HALT_OFFSET handling: Zend/zend_constants.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-77882@lists.php.net to get a copy of this message | ||
Commit: 339d82c72ddd7afc90a14c91b4ff8c47d12e1881
Author: Dmitry Stogov <dmitry@zend.com> Fri, 28 Feb 2014 13:15:40 +0400
Parents: 663990284ba638b782efcf1f812a6c38a19f09b0
Branches: phpng
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=339d82c72ddd7afc90a14c91b4ff8c47d12e1881
Log:
Fixed __COMPILER_HALT_OFFSET handling
Changed paths:
M Zend/zend_constants.c
Diff:
diff --git a/Zend/zend_constants.c b/Zend/zend_constants.c
index cf9802b..0f0af50 100644
--- a/Zend/zend_constants.c
+++ b/Zend/zend_constants.c
@@ -488,12 +488,12 @@ ZEND_API int zend_register_constant(zend_constant *c TSRMLS_DC)
}
/* Check if the user is trying to define the internal pseudo constant name
__COMPILER_HALT_OFFSET__ */
- if ((c->name->len == sizeof("__COMPILER_HALT_OFFSET__")
+ if ((c->name->len == sizeof("__COMPILER_HALT_OFFSET__")-1
&& !memcmp(name->val, "__COMPILER_HALT_OFFSET__",
sizeof("__COMPILER_HALT_OFFSET__")-1))
|| zend_hash_add_mem(EG(zend_constants), name, c, sizeof(zend_constant)) == NULL) {
/* The internal __COMPILER_HALT_OFFSET__ is prefixed by NULL byte */
- if (c->name->val[0] == '\0' && c->name->len >
sizeof("\0__COMPILER_HALT_OFFSET__")
+ if (c->name->val[0] == '\0' && c->name->len >
sizeof("\0__COMPILER_HALT_OFFSET__")-1
&& memcmp(name->val, "\0__COMPILER_HALT_OFFSET__",
sizeof("\0__COMPILER_HALT_OFFSET__")) == 0) {
//??? name++;
}