Bug #12974: some curl bugs found & patched
| From: | root at anight dot org | Date: | Mon, 27 Aug 2001 11:47:32 +0000 |
| Subject: | Bug #12974: some curl bugs found & patched | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-64394@lists.php.net to get a copy of this message | ||
From: root@anight.org
Operating system: freebsd
PHP version: 4.0.6
PHP Bug Type: cURL related
Bug description: some curl bugs found & patched
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;
--
Edit bug report at: http://bugs.php.net/?id=12974&edit=1