mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2025-05-15 09:18:27 +00:00
Fix crash caused by header field regex complexity (#457)
This commit is contained in:
parent
08fc7085e5
commit
ed1b6afa10
2 changed files with 14 additions and 1 deletions
|
@ -1847,7 +1847,7 @@ inline bool read_headers(Stream &strm, Headers &headers) {
|
|||
// the left or right side of the header value:
|
||||
// - https://stackoverflow.com/questions/50179659/
|
||||
// - https://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html
|
||||
static const std::regex re(R"(([^:]+):[\t ]*(.+))");
|
||||
static const std::regex re(R"(([^:]+):[\t ]*([^\t ].*))");
|
||||
|
||||
std::cmatch m;
|
||||
if (std::regex_match(line_reader.ptr(), end, m, re)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue