php.net |  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: nikic@php.net Assigned: cataphract (profile)
Status: Closed Package: intl (PECL)
PHP Version: master-Git-2012-05-13 (Git) OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: nikic@php.net
New email:
PHP Version: OS:

 

 [2012-05-13 21:41 UTC] nikic@php.net
Description:
------------
The script

<?php
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 http://lxr.php.net/opengrok/xref/PHP_TRUNK/ext/intl/dateformat/dateformat.c#109, then svalue isn't freed.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-05-23 13:53 UTC] cataphract@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: cataphract
 [2012-05-23 13:53 UTC] cataphract@php.net
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
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 [2012-05-23 13:53 UTC] cataphract@php.net
Automatic comment on behalf of cataphract
Revision: http://git.php.net/?p=php-src.git;a=commit;h=e08566c6139461db9dbf0f6c2e870d67923ee587
Log: Fixed bug #62017
 [2014-10-07 23:25 UTC] stas@php.net
Automatic comment on behalf of cataphract
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=e08566c6139461db9dbf0f6c2e870d67923ee587
Log: Fixed bug #62017
 [2014-10-07 23:36 UTC] stas@php.net
Automatic comment on behalf of cataphract
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=e08566c6139461db9dbf0f6c2e870d67923ee587
Log: Fixed bug #62017
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 11:01:29 2024 UTC