|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62017 datefmt_create with incorrectly encoded timezone leaks pattern
Submitted: 2012-05-13 21:41 UTC Modified: 2012-05-23 13:53 UTC
From: Assigned: cataphract
Status: Closed Package: intl (PECL)
PHP Version: master-Git-2012-05-13 (Git) OS:
Private report: No CVE-ID:
 [2012-05-13 21:41 UTC]
The script

datefmt_create('', IntlDateFormatter::NONE, IntlDateFormatter::NONE, "\xff", IntlDateFormatter::GREGORIAN, 'a');

Produces this output:

[Sun May 13 23:39:54 2012]  Script:  '/home/nikic/dev/Phuzzy/results/workingFile1_memleak.php'
/home/nikic/dev/php-src/ext/intl/intl_convert.c(78) :  Freeing 0xB69401E4 (4 bytes), script=/home/nikic/dev/Phuzzy/results/workingFile1_memleak.php
/home/nikic/dev/php-src/Zend/zend_alloc.c(2529) : Actual location (location was relayed)
=== Total 1 memory leaks detected ===

The reason is that if an error occurs in, then svalue isn't freed.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-05-23 13:53 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: cataphract
 [2012-05-23 13:53 UTC]
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at

 For Windows:
Thank you for the report, and for helping us make PHP better.

 [2012-05-23 13:53 UTC]
Automatic comment on behalf of cataphract
Log: Fixed bug #62017
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Fri Apr 18 20:01:57 2014 UTC