Bug #25428 [Com]: xmlrpc_server_call_method() causes segfault

From: Date: Wed, 01 Sep 2021 18:52:57 +0000
Subject: Bug #25428 [Com]: xmlrpc_server_call_method() causes segfault
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-236338@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=25428&edit=1 ID: 25428 Comment by: lildurk25428 at gmail dot com Reported by: mfladischer at gmx dot net Summary: xmlrpc_server_call_method() causes segfault Status: Closed Type: Bug Package: XMLRPC-EPI related Operating System: Windows XP PHP Version: 5.0.0 Block user comment: N Private report: N New Comment: Lil Durk is a private agency dedicated to providing responsible access to legal cannabis for adults aged 19 and older. We’re an exclusively online retailer and wholesaler for recreational cannabis and a trusted source for information about cannabis and cannabis-related issues. We believe our work is meaningful and we take pride in our mandate to promote the socially responsible use of legal cannabis. https://lildurk.com/ Previous Comments: ------------------------------------------------------------------------ [2003-10-14 20:16:24] gschlossnagle@php.net This bug has been fixed in CVS. In case this was a PHP problem, 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/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites in short time. Thank you for the report, and for helping us make PHP better. Patch applied. ------------------------------------------------------------------------ [2003-10-14 20:09:57] web-php-bugs at sklar dot com This diff against v1.35 of ext/xmlrpc/xmlrpc-epi.php.c fixes the problem. diff -r1.35 xmlrpc-epi-php.c 1033c1033,1037 < set_output_options(&out, *output_opts); --- > if (argc == 3) { > set_output_options(&out, NULL); > } else { > set_output_options(&out, *output_opts); > } ------------------------------------------------------------------------ [2003-09-08 03:38:40] mfladischer at gmx dot net Description: ------------ When i'm trying to run a XML-RPC server (using the xml-rpc-extension) with PHP5 i get a segfault. Reproduce code: --------------- <?php $request = xmlrpc_encode_request("system.listMethods", array()); $server = xmlrpc_server_create(); echo xmlrpc_server_call_method($server, $request, false); ?> Expected result: ---------------- <?xml version="1.0" encoding="iso-8859-1"?> <methodResponse> <params> <param> <value> <array> <data> <value> <string>system.listMethods</string> </value> <value> <string>system.methodHelp</string> </value> <value> <string>system.methodSignature</string> </value> <value> <string>system.describeMethods</string> </value> <value> <string>system.multiCall</string> </value> <value> <string>system.getCapabilities</string> </value> </data> </array> </value> </param> </params> </methodResponse> Actual result: -------------- Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 16384 (LWP 19945)] 0x0822d92f in zif_xmlrpc_server_call_method (ht=3, return_value=0x408ef0ac, this_ptr=0x0, return_value_used=1) at /linux/devel/php5/ext/xmlrpc/xmlrpc-epi-php.c:1033 1033 set_output_options(&out, *output_opts); (gdb) bt #0 0x0822d92f in zif_xmlrpc_server_call_method (ht=3, return_value=0x408ef0ac, this_ptr=0x0, return_value_used=1) at /linux/devel/php5/ext/xmlrpc/xmlrpc-epi-php.c:1033 #1 0x082a2583 in zend_do_fcall_common_helper (execute_data=0xbfffd180, op_array=0x408ee410) at /linux/devel/php5/Zend/zend_execute.c:2541 #2 0x082a2d25 in zend_do_fcall_handler (execute_data=0xbfffd180, op_array=0x408ee410) at /linux/devel/php5/Zend/zend_execute.c:2687 #3 0x0829e834 in execute (op_array=0x408ee410) at /linux/devel/php5/Zend/zend_execute.c:1267 #4 0x0827f0f7 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /linux/devel/php5/Zend/zend.c:1018 #5 0x0823f15c in php_execute_script (primary_file=0xbffff580) at /linux/devel/php5/main/main.c:1625 #6 0x082acea7 in main (argc=2, argv=0xbffff614) at /linux/devel/php5/sapi/cli/php_cli.c:910 #7 0x40767bf7 in __libc_start_main () from /lib/i686/libc.so.6 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=25428&edit=1

« previous php.bugs (#236338) next »