]> granicus.if.org Git - php/commitdiff
Improvement for bug73297
authorJulien Pauli <jpauli@php.net>
Thu, 17 Nov 2016 10:33:36 +0000 (11:33 +0100)
committerJulien Pauli <jpauli@php.net>
Thu, 17 Nov 2016 10:51:30 +0000 (11:51 +0100)
ext/standard/http_fopen_wrapper.c

index b751488fc988a5c5f16550db4aa475ddda045590..b9ca25687e4a95787b928e2b6a0e56d3e4ac3f0a 100644 (file)
@@ -708,7 +708,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) {