summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/curl/curl.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/ext/curl/curl.c b/ext/curl/curl.c
index 44ce1d60b8..cfcdec13e3 100644
--- a/ext/curl/curl.c
+++ b/ext/curl/curl.c
@@ -483,9 +483,6 @@ PHP_FUNCTION(curl_setopt)
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 @@ PHP_FUNCTION(curl_setopt)
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 @@ PHP_FUNCTION(curl_exec)
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);
}