php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60439 curl_copy_handle segfault when used with CURLOPT_PROGRESSFUNCTION
Submitted: 2011-12-04 01:30 UTC Modified: 2011-12-04 01:34 UTC
From: [email protected] Assigned: pierrick (profile)
Status: Closed Package: cURL related
PHP Version: 5.3.8 OS: Any
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: [email protected]
New email:
PHP Version: OS:

 

 [2011-12-04 01:30 UTC] [email protected]
Description:
------------
The curl_copy_handle function don't work when used with CURLOPT_PROGRESSFUNCTION

Test script:
---------------
<?php
$ch = curl_init('http://www.php.net');
curl_setopt($ch, CURLOPT_NOPROGRESS, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_PROGRESSFUNCTION, function() { });
$ch2 = curl_copy_handle($ch);
echo curl_exec($ch);
unset($ch);
echo curl_exec($ch2);

Expected result:
----------------
No segault

Actual result:
--------------
Segfault

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-12-04 01:34 UTC] [email protected]
Automatic comment from SVN on behalf of pierrick
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=320341
Log: Fixed bug #60439curl_copy_handle segfault when used with CURLOPT_PROGRESSFUNCTION
 [2011-12-04 01:34 UTC] [email protected]
This bug has been fixed in SVN.

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/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 [2011-12-04 01:34 UTC] [email protected]
-Status: Open +Status: Closed -Assigned To: +Assigned To: pierrick
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jun 24 08:01:35 2025 UTC