From 93ce043480bf65f4479995b88bf0b9fd139108f4 Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Mon, 2 May 2011 16:17:52 +0000 Subject: [PATCH] fix segfault in ext/standard/tests/network/http-stream.phpt --- ext/standard/http_fopen_wrapper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c index 0b82a1e805..7a930fd7ab 100644 --- a/ext/standard/http_fopen_wrapper.c +++ b/ext/standard/http_fopen_wrapper.c @@ -545,7 +545,7 @@ finish: /* if the user has configured who they are, send a From: line */ { char *from_address = php_ini_string("from", sizeof("from"), 0); - if (((have_header & HTTP_HEADER_FROM) == 0) && from_address[0] != '\0') { + if (((have_header & HTTP_HEADER_FROM) == 0) && from_address && from_address[0] != '\0') { if (snprintf(scratch, scratch_len, "From: %s\r\n", from_address) > 0) php_stream_write(stream, scratch, strlen(scratch)); } -- 2.50.1