svn: /php/php-src/branches/PHP_5_4/ext/standard/ http_fopen_wrapper.c
| From: | Antony Dovgal | Date: | Tue, 08 Nov 2011 14:12:37 +0000 |
| Subject: | svn: /php/php-src/branches/PHP_5_4/ext/standard/ http_fopen_wrapper.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-66910@lists.php.net to get a copy of this message | ||
tony2001 Tue, 08 Nov 2011 14:12:37 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=318912
Log:
bail out if reading HTTP headers failed
Changed paths:
U php/php-src/branches/PHP_5_4/ext/standard/http_fopen_wrapper.c
Modified: php/php-src/branches/PHP_5_4/ext/standard/http_fopen_wrapper.c
===================================================================
--- php/php-src/branches/PHP_5_4/ext/standard/http_fopen_wrapper.c 2011-11-08 13:30:58 UTC (rev
318911)
+++ php/php-src/branches/PHP_5_4/ext/standard/http_fopen_wrapper.c 2011-11-08 14:12:37 UTC (rev
318912)
@@ -716,7 +716,10 @@
char *e = http_header_line + http_header_line_length - 1;
if (*e != '\n') {
do { /* partial header */
- php_stream_get_line(stream, http_header_line, HTTP_HEADER_BLOCK_SIZE,
&http_header_line_length);
+ if (php_stream_get_line(stream, http_header_line, HTTP_HEADER_BLOCK_SIZE,
&http_header_line_length) == NULL) {
+ php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, "Failed to read HTTP
headers");
+ goto out;
+ }
e = http_header_line + http_header_line_length - 1;
} while (*e != '\n');
continue;