php.net |  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: jpauli@php.net 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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jpauli@php.net
New email:
PHP Version: OS:

 

 [2012-06-14 16:09 UTC] jpauli@php.net
Description:
------------
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

Patches

Simple-patch (last revision 2012-06-18 15:38 UTC by jpauli@php.net)

Add a Patch

Pull Requests

Add a Pull Request

History

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

Patch Name: Simple-patch
Revision:   1340033895
URL:        https://bugs.php.net/patch-display.php?bug=62324&patch=Simple-patch&revision=1340033895
 [2012-06-18 23:06 UTC] felipe@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: jpauli
 [2012-06-19 19:17 UTC] pdezwart@php.net
Automatic comment from SVN on behalf of pdezwart
Revision: http://svn.php.net/viewvc/?view=revision&revision=326256
Log: Bug #62324  Memleak in PHP_MINFO_FUNCTION
 [2012-06-19 19:18 UTC] pdezwart@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.

Fixed @ r326256 in trunk. Will be part of next release. Thanks!
 [2012-06-19 19:18 UTC] pdezwart@php.net
-Status: Assigned +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 06:01:35 2024 UTC