cvs: php4 /ext/curl curl.c

From: Date: Tue, 24 Apr 2001 22:10:41 +0000
Subject: cvs: php4 /ext/curl curl.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-5243@lists.php.net to get a copy of this message
sterling Tue Apr 24 15:10:41 2001 EDT Modified files: /php4/ext/curl curl.c Log: Fixed a crash bug. Return the proper amount. Index: php4/ext/curl/curl.c diff -u php4/ext/curl/curl.c:1.41 php4/ext/curl/curl.c:1.42 --- php4/ext/curl/curl.c:1.41 Tue Mar 20 13:30:42 2001 +++ php4/ext/curl/curl.c Tue Apr 24 15:10:41 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: curl.c,v 1.41 2001/03/20 21:30:42 sterling Exp $ */ +/* $Id: curl.c,v 1.42 2001/04/24 22:10:41 sterling Exp $ */ #include "php.h" @@ -483,9 +483,6 @@ RETURN_FALSE; } - header = emalloc(sizeof(struct curl_slist)); - memset(header, 0, sizeof(struct curl_slist)); - for (zend_hash_internal_pointer_reset(headers); zend_hash_get_current_data(headers, (void **)&current) == SUCCESS; zend_hash_move_forward(headers)) { @@ -520,9 +517,6 @@ RETURN_FALSE; } - commands = (struct curl_slist *) emalloc(sizeof(struct curl_slist)); - memset(commands, 0, sizeof(struct curl_slist)); - for (zend_hash_internal_pointer_reset(php_commands); zend_hash_get_current_data(php_commands, (void **)&current) == SUCCESS; zend_hash_move_forward(php_commands)) { @@ -646,7 +640,7 @@ if (is_temp_file) fclose(fp); - RETURN_STRINGL(ret_data, stat_sb.st_size, 0); + RETURN_STRINGL(ret_data, stat_sb.st_size + 1, 0); }

« previous php.cvs (#5243) next »