HTTP parser: restricting control chars in header fields values.

This also fixes an infinite loop here (found with honggfuzz).
This commit is contained in:
Valentin Bartenev
2018-01-24 15:02:56 +03:00
parent 7e3480b046
commit 477e8177b7

View File

@@ -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)) {