Skip to content

Commit

Permalink
HTTP parser: restricting control chars in header fields values.
Browse files Browse the repository at this point in the history
This also fixes an infinite loop here (found with honggfuzz).
  • Loading branch information
VBart committed Jan 24, 2018
1 parent 7e3480b commit 477e817
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/nxt_http_parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 477e817

Please sign in to comment.