svn: /php/php-src/ branches/PHP_5_3/Zend/zend_constants.c trunk/Zend/zend_constants.c

From: Date: Sat, 13 Nov 2010 19:50:55 +0000
Subject: svn: /php/php-src/ branches/PHP_5_3/Zend/zend_constants.c trunk/Zend/zend_constants.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-63823@lists.php.net to get a copy of this message
felipe Sat, 13 Nov 2010 19:50:55 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=305328 Log: - Fix the constant detection Changed paths: U php/php-src/branches/PHP_5_3/Zend/zend_constants.c U php/php-src/trunk/Zend/zend_constants.c Modified: php/php-src/branches/PHP_5_3/Zend/zend_constants.c =================================================================== --- php/php-src/branches/PHP_5_3/Zend/zend_constants.c 2010-11-13 18:46:11 UTC (rev 305327) +++ php/php-src/branches/PHP_5_3/Zend/zend_constants.c 2010-11-13 19:50:55 UTC (rev 305328) @@ -440,7 +440,7 @@ || zend_hash_add(EG(zend_constants), name, c->name_len, (void *) c, sizeof(zend_constant), NULL)==FAILURE) { /* The internal __COMPILER_HALT_OFFSET__ is prefixed by NULL byte */ - if (strncmp(name+1, "__COMPILER_HALT_OFFSET__", sizeof("__COMPILER_HALT_OFFSET__")) == 0) { + if (memcmp(name, "\0__COMPILER_HALT_OFFSET__", sizeof("\0__COMPILER_HALT_OFFSET__")) == 0) { name++; } zend_error(E_NOTICE,"Constant %s already defined", name); Modified: php/php-src/trunk/Zend/zend_constants.c =================================================================== --- php/php-src/trunk/Zend/zend_constants.c 2010-11-13 18:46:11 UTC (rev 305327) +++ php/php-src/trunk/Zend/zend_constants.c 2010-11-13 19:50:55 UTC (rev 305328) @@ -479,7 +479,7 @@ || zend_hash_add(EG(zend_constants), name, c->name_len, (void *) c, sizeof(zend_constant), NULL)==FAILURE) { /* The internal __COMPILER_HALT_OFFSET__ is prefixed by NULL byte */ - if (strncmp(name+1, "__COMPILER_HALT_OFFSET__", sizeof("__COMPILER_HALT_OFFSET__")) == 0) { + if (memcmp(name, "\0__COMPILER_HALT_OFFSET__", sizeof("\0__COMPILER_HALT_OFFSET__")) == 0) { name++; } zend_error(E_NOTICE,"Constant %s already defined", name);

« previous php.cvs (#63823) next »