tony2001 Mon, 02 May 2011 16:17:52 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=310706
Log: fix segfault in ext/standard/tests/network/http-stream.phpt Changed paths: U php/php-src/branches/PHP_5_3/ext/standard/http_fopen_wrapper.c Modified: php/php-src/branches/PHP_5_3/ext/standard/http_fopen_wrapper.c =================================================================== --- php/php-src/branches/PHP_5_3/ext/standard/http_fopen_wrapper.c 2011-05-02 11:58:59 UTC (rev 310705) +++ php/php-src/branches/PHP_5_3/ext/standard/http_fopen_wrapper.c 2011-05-02 16:17:52 UTC (rev 310706) @@ -545,7 +545,7 @@ /* 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)); }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php