Memory leak in xmlrpc_encode_request() when encoding output option specified
| 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: | None | ||
[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
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2005-07-01 00:30 UTC] iliaa@php.net