From a0414c8466220308c14e57abe15e66e0e17b7108 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Mon, 12 Jan 2009 10:12:10 +0000 Subject: [PATCH] fix bug#15499 HttpRequest::addHeaders segfaults when passing array(1) --- http_request_object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.30.2