]> granicus.if.org Git - php/commitdiff
use correct element size, avoid reading stack
authorAntony Dovgal <tony2001@php.net>
Wed, 3 Feb 2016 12:11:59 +0000 (15:11 +0300)
committerAntony Dovgal <tony2001@php.net>
Wed, 3 Feb 2016 12:14:10 +0000 (15:14 +0300)
ext/curl/interface.c

index dd823f538c2c6133a4bdd91dbc73d696bc31d7fb..23c6e1835b834ca3047377f2da0a6d5a77e4322f 100644 (file)
@@ -1751,7 +1751,7 @@ static php_curl *alloc_curl_handle()
        memset(&ch->err, 0, sizeof(struct _php_curl_error));
 
        zend_llist_init(&ch->to_free->str,   sizeof(char *),          (llist_dtor_func_t)curl_free_string, 0);
-       zend_llist_init(&ch->to_free->post,  sizeof(struct HttpPost), (llist_dtor_func_t)curl_free_post,   0);
+       zend_llist_init(&ch->to_free->post,  sizeof(struct *HttpPost), (llist_dtor_func_t)curl_free_post,   0);
 
        ch->to_free->slist = emalloc(sizeof(HashTable));
        zend_hash_init(ch->to_free->slist, 4, NULL, curl_free_slist, 0);