PHP :: Bug #33562 :: date("") crash php
| Bug #33562 | date("") crash php | ||||
|---|---|---|---|---|---|
| Submitted: | 2005-07-04 06:53 UTC | Modified: | 2005-07-04 09:48 UTC | ||
| From: | xuefer at 21cn dot com | Assigned: | derick (profile) | ||
| Status: | Closed | Package: | Date/time related | ||
| PHP Version: | 5CVS-2005-07-04 | OS: | * | ||
| Private report: | No | CVE-ID: | None | ||
[2005-07-04 06:53 UTC] xuefer at 21cn dot com
Description:
------------
Breakpoint 1, php_format_date (format=0x1015d770 "", format_len=0,
t=0x1015ce28, localtime=1) at /home/Xuefer/src/php5/ext/date/php_date.c:317
317 return string.c;
(gdb) p string.c
$2 = 0x0
(gdb) l
310
311 smart_str_0(&string);
312
313 if (localtime) {
314 timelib_time_offset_dtor(offset);
315 }
316
317 return string.c;
318 }
(gdb) c
#0 0x610e9731 in strlen () from /usr/bin/cygwin1.dll
#1 0x004256f5 in php_date (ht=1, return_value=0x1015be68,
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1, localtime=1)
at /home/Xuefer/src/php5/ext/date/php_date.c:344
crash at:
(gdb) fr 1
#1 0x004256f5 in php_date (ht=1, return_value=0x1015be68,
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1, localtime=1)
at /home/Xuefer/src/php5/ext/date/php_date.c:344
344 RETVAL_STRING(string, 0);
Reproduce code:
---------------
php -r 'date("");'
or
<?php
echo date("");
?>
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2005-07-04 09:48 UTC] derick@php.net