From: Michael Wallner Date: Mon, 12 Jan 2009 10:12:10 +0000 (+0000) Subject: fix bug#15499 HttpRequest::addHeaders segfaults when passing array(1) X-Git-Tag: RELEASE_1_7_0b1~6 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=a0414c8466220308c14e57abe15e66e0e17b7108;p=m6w6%2Fext-http fix bug#15499 HttpRequest::addHeaders segfaults when passing array(1) --- diff --git a/http_request_object.c b/http_request_object.c index 1b42347..c72d908 100644 --- a/http_request_object.c +++ b/http_request_object.c @@ -749,7 +749,7 @@ STATUS _http_request_object_responsehandler(http_request_object *obj, zval *this static int apply_pretty_key(void *pDest, int num_args, va_list args, zend_hash_key *hash_key) { - if (hash_key->nKeyLength > 1) { + if (hash_key->arKey && hash_key->nKeyLength > 1) { hash_key->h = zend_hash_func(pretty_key(hash_key->arKey, hash_key->nKeyLength - 1, 1, 0), hash_key->nKeyLength); } return ZEND_HASH_APPLY_KEEP;