#43386 [NEW]: php_array_init_globals calls memset() incorrectly
| From: | andy at petdance dot com | Date: | Fri, 23 Nov 2007 06:54:45 +0000 |
| Subject: | #43386 [NEW]: php_array_init_globals calls memset() incorrectly | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-119982@lists.php.net to get a copy of this message | ||
From: andy at petdance dot com
Operating system: andy
PHP version: 5.3CVS-2007-11-23 (CVS)
PHP Bug Type: Unknown/Other Function
Bug description: php_array_init_globals calls memset() incorrectly
Description:
------------
This function in ext/standard/array.c is supposed to zero out the contents
of array_globals, but will actually only zero out a single pointer's worth
of data.
static void php_array_init_globals(zend_array_globals *array_globals)
{
memset(array_globals, 0, sizeof(array_globals));
}
That should be sizeof(*array_globals).
--
Edit bug report at http://bugs.php.net/?id=43386&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=43386&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=43386&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=43386&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=43386&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=43386&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=43386&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=43386&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=43386&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=43386&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=43386&r=support
Expected behavior: http://bugs.php.net/fix.php?id=43386&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=43386&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=43386&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=43386&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43386&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=43386&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=43386&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=43386&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=43386&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=43386&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=43386&r=mysqlcfg