]> 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:53 +0000 (11:51 +0100)
ext/standard/http_fopen_wrapper.c

index 72fa1894b6013dc81d5dfd1ae491d614cc622df2..f5f338c144d09944b964fb8d486950d7c698d3f2 100644 (file)
@@ -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) {