Bug #72042 [Fbk->NoF]: curl_setopt($c, CURLOPT_HTTPHEADER, []); causes segfault

From: Date: Sun, 01 May 2016 04:22:27 +0000
Subject: Bug #72042 [Fbk->NoF]: curl_setopt($c, CURLOPT_HTTPHEADER, []); causes segfault
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-200850@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: php-bugs@lists.php.net Reported by: jambozx at gmail dot com Summary: curl_setopt($c, CURLOPT_HTTPHEADER, []); causes segfault -Status: Feedback +Status: No Feedback Type: Bug Package: cURL related Operating System: Debian 7/wheezy PHP Version: 7.0.5 Private report: N New Comment: No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Re-Opened". Thank you. Previous Comments: ------------------------------------------------------------------------ [2016-04-17 11:23:46] requinix@php.net 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) ------------------------------------------------------------------------ [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

« previous php.bugs (#200850) next »