diff options
| author | Antony Dovgal <tony2001@php.net> | 2011-05-02 16:17:52 +0000 |
|---|---|---|
| committer | Antony Dovgal <tony2001@php.net> | 2011-05-02 16:17:52 +0000 |
| commit | 93ce043480bf65f4479995b88bf0b9fd139108f4 (patch) | |
| tree | 78f8030587710b4db9e244a5ca218ed310148cbf | |
| parent | f3cd7fdda40a026bea442ecb623966587967de70 (diff) | |
| download | php-git-93ce043480bf65f4479995b88bf0b9fd139108f4.tar.gz | |
fix segfault in ext/standard/tests/network/http-stream.phpt
| -rw-r--r-- | ext/standard/http_fopen_wrapper.c | 2 |
1 files changed, 1 insertions, 1 deletions
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)); } |
