Skip to content

Commit 477e817

Browse files
committed
HTTP parser: restricting control chars in header fields values.
This also fixes an infinite loop here (found with honggfuzz).
1 parent 7e3480b commit 477e817

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/nxt_http_parse.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -650,9 +650,7 @@ nxt_http_parse_field_value(nxt_http_request_parse_t *rp, u_char **pos,
650650
break;
651651
}
652652

653-
if (ch == '\0') {
654-
return NXT_HTTP_PARSE_INVALID;
655-
}
653+
return NXT_HTTP_PARSE_INVALID;
656654
}
657655

658656
if (nxt_fast_path(p != *pos)) {

0 commit comments

Comments
 (0)