php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12974 some curl bugs found & patched
Submitted: 2001-08-27 07:47 UTC Modified: 2001-09-03 14:35 UTC
From: root at anight dot org Assigned:
Status: Closed Package: cURL related
PHP Version: 4.0.6 OS: freebsd
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: root at anight dot org
New email:
PHP Version: OS:

 

 [2001-08-27 07:47 UTC] root at anight dot org
i have found & patched php interface functions to curl.
i have no time to commit it to cvs, so here's the diff:

--- curl.c.orig Mon Aug 27 15:51:37 2001
+++ curl.c      Mon Aug 27 15:42:13 2001
@@ -488,6 +488,10 @@
        alloc_curl_handle(&ch);
 
        ch->cp = curl_easy_init();
+
+       memset(ch->err.str, 0, sizeof(ch->err.str));
+       ch->err.no = 0;
+
        if (! ch->cp) {
                php_error(E_WARNING, "Cannot initialize a new cURL handle");
                RETURN_FALSE;
@@ -526,7 +530,7 @@
                   **zoption, 
                   **zvalue;
        php_curl    *ch;
-       CURLcode     error;
+       CURLcode     error = 0;
        int          option;
 
        if (ZEND_NUM_ARGS() != 3 ||
@@ -633,6 +637,7 @@
                convert_to_long_ex(zvalue);
 
                ch->handlers->write->type = PHP_CURL_BINARY;
+               break;
        case CURLOPT_WRITEFUNCTION:
                zval_add_ref(zvalue);
                ch->handlers->write->func = *zvalue;

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-09-03 14:35 UTC] sterling@php.net
relevant patches committed, thanks.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Sep 21 01:01:27 2024 UTC