tony2001 Tue, 08 Nov 2011 13:30:58 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=318911
Log:
bail out if reading HTTP headers failed
Changed paths:
U php/php-src/trunk/ext/standard/http_fopen_wrapper.c
Modified: php/php-src/trunk/ext/standard/http_fopen_wrapper.c
===================================================================
--- php/php-src/trunk/ext/standard/http_fopen_wrapper.c 2011-11-08 12:34:37 UTC
(rev 318910)
+++ php/php-src/trunk/ext/standard/http_fopen_wrapper.c 2011-11-08 13:30:58 UTC
(rev 318911)
@@ -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;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php