php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12733 cURL crash (reproducible)
Submitted: 2001-08-14 03:14 UTC Modified: 2001-08-15 15:32 UTC
From: graeme at inetix dot com dot au Assigned:
Status: Closed Package: cURL related
PHP Version: 4.0CVS-2001-08-14 OS: Linux 2.2.19-x86
Private report: No CVE-ID: None
 [2001-08-14 03:14 UTC] graeme at inetix dot com dot au
PHP - latest CVS
curl 7.8 (i686-pc-linux-gnu) libcurl 7.8 (SSL 0.9.5)
OpenSSL 0.9.6b 9 Jul 2001

I've just noticed the version problem in the curl line above even tho they're all fresh compiles. It may bea curl bug but I'll file here just in case.

Script is in SOAP/Client.php in PEAR repository. Running test scropt also in the repository causes segfault either in http or https

Relevant code is:
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: text/xml"));
curl_setopt($ch, CURLOPT_URL, $url); 
curl_setopt($ch, CURLOPT_FAILONERROR, 1); 
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); 
curl_setopt($ch, CURLOPT_USERAGENT, $this->_userAgent);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); 
curl_setopt($ch, CURLOPT_VERBOSE,1); 
curl_setopt($ch, CURLOPT_POST, 1);
$result=curl_exec ($ch); 
curl_close ($ch); 

Backtrace:
#0  0x40091d11 in Curl_http (conn=0x8282860) at http.c:771
#1  0x40097dc2 in Curl_do (conn=0x8282860) at url.c:2308
#2  0x4009f50e in Curl_perform (curl=0x8275a50) at transfer.c:868
#3  0x4009f818 in curl_easy_perform (curl=0x8275a50) at easy.c:163
#4  0x808118d in zif_curl_exec (ht=1, return_value=0x8273bf4, this_ptr=0x0, return_value_used=1) at curl.c:841
#5  0x8117a96 in execute (op_array=0x8261b5c) at ./zend_execute.c:1589
#6  0x8117c8a in execute (op_array=0x8246e4c) at ./zend_execute.c:1629
#7  0x80ff1ed in zend_execute_scripts (type=8, file_count=3) at zend.c:806
#8  0x807a558 in php_execute_script (primary_file=0xbffffa64) at main.c:1308
#9  0x80788eb in main (argc=3, argv=0xbffffac4) at cgi_main.c:737

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-08-15 15:32 UTC] sterling@php.net
Its a cURL bug (so quoth the author of cURL).  the problem is your supplying the CURLOPT_POST argument, but no postfields.  this will be fixed in cURL's cvs.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 10:01:28 2024 UTC