php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33523 Memory leak in xmlrpc_encode_request() when encoding output option specified
Submitted: 2005-06-30 15:31 UTC Modified: 2005-07-01 00:30 UTC
From: squasar at eternalviper dot net Assigned:
Status: Closed Package: XMLRPC-EPI related
PHP Version: 5.1.0b2 OS: Mac OS X 10.4.1/Darwin 8.1.0
Private report: No CVE-ID:
 [2005-06-30 15:31 UTC] squasar at eternalviper dot net
Description:
------------
Calling xmlrpc_encode_request() with 'encoding' specified in 
output_options causes a memory leak in xmlrpc-epi-php.c on 
line 381, regardless of the encoding specified. It looks as if 
a call to estrdup() does not have a matching efree().

'./configure' '--prefix=/usr' '--with-apxs' '--enable-cli' '--
disable-short-tags' '--with-zlib' '--with-bz2' '--enable-ftp' 
'--with-iconv' '--enable-mbstring' '--with-mysql=/usr' '--
enable-sockets' '--enable-debug' '--enable-simplexml' '--with-
xsl=/usr' '--with-curl=/usr' '--with-curlwrappers' '--enable-
bcmath' '--with-gmp=/usr/local' '--with-gd' '--with-freetype-
dir=/usr/X11R6' '--enable-gd-native-ttf' '--with-imap=/usr/
local/imap' '--with-imap-ssl=/usr' '--with-xmlrpc' '--with-
xml-dir=/usr' '--with-expat-dir=/usr' '--with-iconv-dir=/usr'

Reproduce code:
---------------
<?php
$ignore_me = xmlrpc_encode_request( 'any_method_name', array(), array( 'encoding' => 'utf-8' ) );
?>

Expected result:
----------------
No output at all.

Actual result:
--------------
Zend's memory debugger shows:
/Users/gwynne/src/php-src/ext/xmlrpc/xmlrpc-epi-php.c(381) :  
Freeing 0x01BBB368 (6 bytes), script=-
=== Total 1 memory leaks detected ===


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-07-01 00:30 UTC] iliaa@php.net
This bug has been fixed in CVS.

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/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Mon Apr 21 00:02:04 2014 UTC