PHP 4.0 Bug #9181: curl_setopt options causes seg faults

From: Date: Thu, 08 Feb 2001 20:35:50 +0000
Subject: PHP 4.0 Bug #9181: curl_setopt options causes seg faults
Groups: php.dev 
Request: Send a blank email to php-dev+get-46059@lists.php.net to get a copy of this message
From: wmartino@webmachines.com Operating system: Redhat Linux 6.1 PHP version: 4.0.4pl1 PHP Bug Type: Reproduceable crash Bug description: curl_setopt options causes seg faults curl_setopt with the options CURLOPT_HTTPHEADER, CURLOPT_QUOTE, and CURLOPT_POSTQUOTE used with a scalar value cause php to seg fault. In curl.c:149, there is a typo where the constant name CURLOPT_HTTPHEADER is assigned to CURLOPT_HTTP. Also, in several places, the code for the function if_curl_setopt assumes that curl_value is an aggregate type, when it may be a single string. (Notably in the case statements for CURLOPT_HTTPHEADER,CURLOPT_POSTQUOTE, and CURLOPT_QUOTE. ) Lastly, in some places where a curl_slist is being built, memory is allocated for the first node when it should not be. (Memory is allocated inside of curl_slist_append). If you write a script that uses the CURLOPT_HTTPHEADER, or the others, you can easily reproduce this. -- Edit Bug report at: http://bugs.php.net/?id=9181&edit=1

« previous php.dev (#46059) next »