From d02141d8a062b2d7665e489ead77194f9343f09c Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Tue, 17 Oct 2006 19:13:16 +0000 Subject: [PATCH] - fix crash if *val == NULL --- http_send_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/http_send_api.c b/http_send_api.c index c76656c..1fe1d4d 100644 --- a/http_send_api.c +++ b/http_send_api.c @@ -200,7 +200,7 @@ PHP_HTTP_API void _http_hide_header_ex(const char *name, size_t name_len TSRMLS_ /* {{{ void http_send_header_zval(char*, zval **, zend_bool) */ PHP_HTTP_API void _http_send_header_zval_ex(const char *name, size_t name_len, zval **val, zend_bool replace TSRMLS_DC) { - if (!val || Z_TYPE_PP(val) == IS_NULL || (Z_TYPE_PP(val) == IS_STRING && !Z_STRLEN_PP(val))) { + if (!val || !*val || Z_TYPE_PP(val) == IS_NULL || (Z_TYPE_PP(val) == IS_STRING && !Z_STRLEN_PP(val))) { http_hide_header_ex(name, name_len); } else if (Z_TYPE_PP(val) == IS_ARRAY || Z_TYPE_PP(val) == IS_OBJECT) { zend_bool first = replace; -- 2.30.2