php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68285 leak in timelib_parse_zone
Submitted: 2014-10-22 14:17 UTC Modified: 2014-12-30 15:14 UTC
From: mike@php.net Assigned: fmargaine (profile)
Status: Closed Package: Date/time related
PHP Version: 5.6Git-2014-10-22 (Git) OS:
Private report: No CVE-ID: None
 [2014-10-22 14:17 UTC] mike@php.net
Description:
------------
Seems like a leak has been introduced in 2b9af967

Test script:
---------------
$ memcheck sapi/cli/php -d date.timezone=UTC -r '
date_create("@123")
->setTimezone(new DateTimezone("UTC"))
->format("D, d M Y H:i:s \\G\\M\\T");
'


Actual result:
--------------
==27268== 4 bytes in 1 blocks are definitely lost in loss record 1 of 4
==27268==    at 0x4C29F90: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==27268==    by 0x7A219C9: strdup (in /usr/lib/libc-2.20.so)
==27268==    by 0x463FC1: timelib_time_tz_abbr_update (timelib.c:76)
==27268==    by 0x439E90: timelib_parse_zone (parse_date.re:776)
==27268==    by 0x4316A6: timezone_initialize (php_date.c:3686)
==27268==    by 0x431867: zim_DateTimeZone___construct (php_date.c:3730)
==27268==    by 0x8AAD4E: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:558)
==27268==    by 0x8AB525: ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (zend_vm_execute.h:693)
==27268==    by 0x8AA3BD: execute_ex (zend_vm_execute.h:363)
==27268==    by 0x8AA446: zend_execute (zend_vm_execute.h:388)
==27268==    by 0x852492: zend_eval_stringl (zend_execute_API.c:1080)
==27268==    by 0x852731: zend_eval_stringl_ex (zend_execute_API.c:1127)
==27268==    by 0x8527B5: zend_eval_string_ex (zend_execute_API.c:1138)
==27268==    by 0x9182BE: do_cli (php_cli.c:1034)
==27268==    by 0x9192CB: main (php_cli.c:1378)



Patches

Pull Requests

Pull requests:

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-11-24 11:19 UTC] fmargaine@php.net
-Assigned To: +Assigned To: fmargaine
 [2014-12-30 15:14 UTC] fmargaine@php.net
-Status: Assigned +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 07 00:01:29 2024 UTC