mirror of
https://github.com/php/php-src.git
synced 2025-08-18 23:18:56 +02:00
bail out if reading HTTP headers failed
This commit is contained in:
parent
b44adcd5ce
commit
152aaba03f
1 changed files with 4 additions and 1 deletions
|
@ -719,7 +719,10 @@ finish:
|
||||||
char *e = http_header_line + http_header_line_length - 1;
|
char *e = http_header_line + http_header_line_length - 1;
|
||||||
if (*e != '\n') {
|
if (*e != '\n') {
|
||||||
do { /* partial header */
|
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;
|
e = http_header_line + http_header_line_length - 1;
|
||||||
} while (*e != '\n');
|
} while (*e != '\n');
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue