1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 11:13:36 +02:00

bail out if reading HTTP headers failed

This commit is contained in:
Antony Dovgal
2011-11-08 13:30:58 +00:00
parent e86830273b
commit 22b39bcc75
+4 -1
View File
@@ -716,7 +716,10 @@ finish:
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;