cvs: php4 /ext/curl curl.c

From: Date: Mon, 02 Jul 2001 12:08:22 +0000
Subject: cvs: php4 /ext/curl curl.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-6062@lists.php.net to get a copy of this message
sterling Mon Jul 2 08:08:22 2001 EDT Modified files: /php4/ext/curl curl.c Log: Fix possible corruption problem with curl_errno() and curl_error() Index: php4/ext/curl/curl.c diff -u php4/ext/curl/curl.c:1.63 php4/ext/curl/curl.c:1.64 --- php4/ext/curl/curl.c:1.63 Mon Jul 2 07:56:08 2001 +++ php4/ext/curl/curl.c Mon Jul 2 08:08:21 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: curl.c,v 1.63 2001/07/02 11:56:08 sterling Exp $ */ +/* $Id: curl.c,v 1.64 2001/07/02 12:08:21 sterling Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -507,7 +507,8 @@ (*ch)->handlers->write = ecalloc(1, sizeof(php_curl_write)); (*ch)->handlers->write_header = ecalloc(1, sizeof(php_curl_write)); (*ch)->handlers->read = ecalloc(1, sizeof(php_curl_read)); - + memset(&(*ch)->err, 0, sizeof((*ch)->err)); + zend_llist_init(&(*ch)->to_free.str, sizeof(char *), (void(*)(void *)) curl_free_string, 0); zend_llist_init(&(*ch)->to_free.slist, sizeof(struct curl_slist), @@ -943,6 +944,7 @@ } ZEND_FETCH_RESOURCE(ch, php_curl *, zid, -1, le_curl_name, le_curl); + ch->err.str[CURL_ERROR_SIZE] = 0; RETURN_STRING(ch->err.str, 1); } /* }}} */

« previous php.cvs (#6062) next »