#38721 [Asn->Csd]: date_parse() invalid read
ID: 38721
Updated by: tony2001@php.net
Reported By: tony2001@php.net
-Status: Assigned
+Status: Closed
Bug Type: Date/time related
Operating System: Linux
PHP Version: 5CVS-2006-09-05 (CVS)
Assigned To: derick
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:
------------------------------------------------------------------------
[2006-09-05 11:38:09] tony2001@php.net
Description:
------------
valgrind reports an invalid read in date_parse().
Reproduce code:
---------------
<?php
date_parse("");
?>
Expected result:
----------------
.
Actual result:
--------------
==6705== Invalid read of size 1
==6705== at 0x80EBDF9: timelib_strtotime (parse_date.re:1528)
==6705== by 0x80C90CD: zif_date_parse (php_date.c:1694)
==6705== by 0x831A56D: zend_do_fcall_common_helper_SPEC
(zend_vm_execute.h:200)
==6705== by 0x831D460: ZEND_DO_FCALL_SPEC_CONST_HANDLER
(zend_vm_execute.h:1657)
==6705== by 0x831A180: execute (zend_vm_execute.h:92)
==6705== by 0x82F1312: zend_eval_string (zend_execute_API.c:1130)
==6705== by 0x82F1472: zend_eval_string_ex
(zend_execute_API.c:1164)
==6705== by 0x836184B: main (php_cli.c:1141)
==6705== Address 0x49BCD27 is 1 bytes before a block of size 1
alloc'd
==6705== at 0x401C4CE: malloc (vg_replace_malloc.c:149)
==6705== by 0x82E30BA: _emalloc (zend_alloc.c:1628)
==6705== by 0x82E3454: _estrndup (zend_alloc.c:1752)
==6705== by 0x82FAD23: _zval_copy_ctor_func (zend_variables.c:120)
==6705== by 0x835DE0C: _zval_copy_ctor (zend_variables.h:45)
==6705== by 0x831D830: ZEND_SEND_VAL_SPEC_CONST_HANDLER
(zend_vm_execute.h:1786)
==6705== by 0x831A180: execute (zend_vm_execute.h:92)
==6705== by 0x82F1312: zend_eval_string (zend_execute_API.c:1130)
==6705== by 0x82F1472: zend_eval_string_ex
(zend_execute_API.c:1164)
==6705== by 0x836184B: main (php_cli.c:1141)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=38721&edit=1
Thread (3 messages)