#43386 [Opn->Csd]: php_array_init_globals calls memset() incorrectly
| From: | iliaa@php.net | Date: | Sun, 25 Nov 2007 15:57:03 +0000 |
| Subject: | #43386 [Opn->Csd]: php_array_init_globals calls memset() incorrectly | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-120036@lists.php.net to get a copy of this message | ||
ID: 43386
Updated by: iliaa@php.net
Reported By: andy at petdance dot com
-Status: Open
+Status: Closed
Bug Type: *General Issues
Operating System: *
PHP Version: 5.3CVS-2007-11-23 (CVS)
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2007-11-23 06:54:45] andy at petdance dot com
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 this bug report at http://bugs.php.net/?id=43386&edit=1