|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62324 Memleak in PHP_MINFO_FUNCTION
Submitted: 2012-06-14 16:09 UTC Modified: 2012-06-19 19:18 UTC
From: Assigned: jpauli (profile)
Status: Closed Package: amqp (PECL)
PHP Version: 5.3.14 OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
14 - 4 = ?
Subscribe to this entry?

 [2012-06-14 16:09 UTC]
PHP_MINFO_FUNCTION uses spprintf() which reallocates the buffer passed to it, and 
the extension doesn't free it

A very simple patch is to directly pass arguments like this :

php_info_print_table_header(2, "Compiled",					
__DATE__ " @ "  __TIME__);

Test script:
php --ri amqp

Expected result:
No leak

Actual result:
Leak with smart_str in spprintf


Simple-patch (last revision 2012-06-18 15:38 UTC by

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-06-18 15:38 UTC]
The following patch has been added/updated:

Patch Name: Simple-patch
Revision:   1340033895
 [2012-06-18 23:06 UTC]
-Status: Open +Status: Assigned -Assigned To: +Assigned To: jpauli
 [2012-06-19 19:17 UTC]
Automatic comment from SVN on behalf of pdezwart
Log: Bug #62324  Memleak in PHP_MINFO_FUNCTION
 [2012-06-19 19:18 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.

Fixed @ r326256 in trunk. Will be part of next release. Thanks!
 [2012-06-19 19:18 UTC]
-Status: Assigned +Status: Closed
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Nov 30 12:03:35 2021 UTC