From 477e8177b70acb694759e62d830b8a311a736324 Mon Sep 17 00:00:00 2001 From: Valentin Bartenev Date: Wed, 24 Jan 2018 15:02:56 +0300 Subject: [PATCH] HTTP parser: restricting control chars in header fields values. This also fixes an infinite loop here (found with honggfuzz). --- src/nxt_http_parse.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/nxt_http_parse.c b/src/nxt_http_parse.c index 975fdd98..7393e19e 100644 --- a/src/nxt_http_parse.c +++ b/src/nxt_http_parse.c @@ -650,9 +650,7 @@ nxt_http_parse_field_value(nxt_http_request_parse_t *rp, u_char **pos, break; } - if (ch == '\0') { - return NXT_HTTP_PARSE_INVALID; - } + return NXT_HTTP_PARSE_INVALID; } if (nxt_fast_path(p != *pos)) {