com php-src: Improvement for bug73297: ext/standard/http_fope n_wrapper.c
| From: | JulienPauli | Date: | Thu, 17 Nov 2016 10:51:53 +0000 |
| Subject: | com php-src: Improvement for bug73297: ext/standard/http_fope n_wrapper.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-95835@lists.php.net to get a copy of this message | ||
Commit: 4b2cbc3f2fab8721887d53536916b15e870a7272
Author: Julien Pauli <jpauli@php.net> Thu, 17 Nov 2016 11:33:36 +0100
Parents: 66ac73bee8d14673332c76fe62c7fcab00f5c5c4
Branches: PHP-7.0
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=4b2cbc3f2fab8721887d53536916b15e870a7272
Log:
Improvement for bug73297
Bugs:
https://bugs.php.net/73297
Changed paths:
M ext/standard/http_fopen_wrapper.c
Diff:
diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c
index 72fa189..f5f338c 100644
--- a/ext/standard/http_fopen_wrapper.c
+++ b/ext/standard/http_fopen_wrapper.c
@@ -706,7 +706,7 @@ finish:
while (
!php_stream_eof(stream)
&& php_stream_get_line(stream, tmp_line, sizeof(tmp_line) - 1, &tmp_line_len) !=
NULL
- && ( tmp_line_len < 6 || strncasecmp(tmp_line, "HTTP/1", 6) )
+ && ( tmp_line_len < sizeof("HTTP/1") - 1 || strncasecmp(tmp_line,
"HTTP/1", sizeof("HTTP/1") - 1) )
);
if (tmp_line_len > 9) {