mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-10-13 10:24:47 +00:00
Fix OSS-Fuzz #508087118: avoid stack overflow in str2tag
str2tag_core is recursive (one frame per character), so a long runtime input such as a fuzzer-supplied Content-Type would overflow the stack. Rewrite the runtime entry point str2tag() iteratively while keeping the recursive constexpr str2tag_core for compile-time UDL evaluation. The hash output is unchanged for all inputs.
This commit is contained in:
1 parent
b223e29778
commit
92aecf85d8
3 files changed
+17
-1
No files matched your search
BIN
Binary file not shown.
Reference in new issue
Block a user