Bug #72042 [Opn->Fbk]: curl_setopt($c, CURLOPT_HTTPHEADER, []); causes segfault
| From: | requinix@php.net | Date: | Sun, 17 Apr 2016 11:23:47 +0000 |
| Subject: | Bug #72042 [Opn->Fbk]: curl_setopt($c, CURLOPT_HTTPHEADER, []); causes segfault | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-200612@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=72042&edit=1
ID: 72042
Updated by: requinix@php.net
Reported by: jambozx at gmail dot com
Summary: curl_setopt($c, CURLOPT_HTTPHEADER, []); causes
segfault
-Status: Open
+Status: Feedback
Type: Bug
Package: cURL related
Operating System: Debian 7/wheezy
PHP Version: 7.0.5
Block user comment: N
Private report: N
New Comment:
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php
for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php
for Win32
Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.
(duplicate of bug #71703, but that NoF-ed)
Previous Comments:
------------------------------------------------------------------------
[2016-04-17 11:07:08] jambozx at gmail dot com
Description:
------------
Passing an empty array as the third parameter of curl_setopt() when the second parameter is
CURLOPT_HTTPHEADER causes a segmentation fault. Also when a variable with value [] is passed to it.
My cURL version is 7.48.0 and had the same problem with a much older cURL.
Test script:
---------------
<?php
$c = curl_init();
print "1";
curl_setopt($c, CURLOPT_HTTPHEADER, []);
die("done");
Expected result:
----------------
1done
Actual result:
--------------
1Segmentation fault
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=72042&edit=1