From 81ca70aec1af3474e2b0b59d0bd196a153295b51 Mon Sep 17 00:00:00 2001 From: Sean Cunningham Date: Fri, 11 Feb 2011 13:27:06 -0500 Subject: [PATCH] Avoid chunk trailer overflow. Check for overflow during chunk trailer by removing unnecessary check in macro PARSING_HEADER. This will force the parser to abort if the chunk trailer contains more than HTTP_MAX_HEADER_SIZE of data. --- http_parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/http_parser.c b/http_parser.c index 9c5640f..1397335 100644 --- a/http_parser.c +++ b/http_parser.c @@ -258,7 +258,7 @@ enum state }; -#define PARSING_HEADER(state) (state <= s_headers_almost_done && 0 == (parser->flags & F_TRAILING)) +#define PARSING_HEADER(state) (state <= s_headers_almost_done) enum header_states