diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2018-10-21 12:10:54 +0200 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2018-10-21 12:10:54 +0200 |
commit | 10800106b3063a7122afd48f636b70e7c3e21d6a (patch) | |
tree | 2545d2b397f4b07357f6259f9b838e0433d013de /ext/xmlrpc/xmlrpc-epi-php.c | |
parent | 7f8efd9a6e12404424e70c601951194d1957586b (diff) | |
parent | 502b187ae8cbd24f4d8c05b8a3c4e52079314bbd (diff) | |
download | php-git-10800106b3063a7122afd48f636b70e7c3e21d6a.tar.gz |
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
Fix #75282: xmlrpc_encode_request() crashes
Diffstat (limited to 'ext/xmlrpc/xmlrpc-epi-php.c')
-rw-r--r-- | ext/xmlrpc/xmlrpc-epi-php.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ext/xmlrpc/xmlrpc-epi-php.c b/ext/xmlrpc/xmlrpc-epi-php.c index 82bdd12b8a..737a3f84a5 100644 --- a/ext/xmlrpc/xmlrpc-epi-php.c +++ b/ext/xmlrpc/xmlrpc-epi-php.c @@ -695,7 +695,11 @@ PHP_FUNCTION(xmlrpc_encode_request) outBuf = XMLRPC_REQUEST_ToXML(xRequest, 0); if (outBuf) { RETVAL_STRING(outBuf); +#ifdef HAVE_XMLRPC_BUNDLED efree(outBuf); +#else + free(outBuf); +#endif } XMLRPC_RequestFree(xRequest, 1); } @@ -729,7 +733,11 @@ PHP_FUNCTION(xmlrpc_encode) if (xOut) { if (outBuf) { RETVAL_STRING(outBuf); +#ifdef HAVE_XMLRPC_BUNDLED efree(outBuf); +#else + free(outBuf); +#endif } /* cleanup */ XMLRPC_CleanupValue(xOut); @@ -1092,7 +1100,11 @@ PHP_FUNCTION(xmlrpc_server_call_method) outBuf = XMLRPC_REQUEST_ToXML(xResponse, &buf_len); if (outBuf) { RETVAL_STRINGL(outBuf, buf_len); +#ifdef HAVE_XMLRPC_BUNDLED efree(outBuf); +#else + free(outBuf); +#endif } /* cleanup after ourselves. what a sty! */ XMLRPC_RequestFree(xResponse, 0); |