You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The str::from_utf8_unchecked() invocations all look correct. The loops assert that every byte in the slice prior to the Bytes iterator's current position is valid, and the checks done on the bytes all imply that the prefix contains valid UTF-8.
https://crates.io/crates/httparse is a widely used HTTP parsing crate, most notably powering
hyper
andreqwest
.cargo-geiger shows the following when
httparse
is used viareqwest
:Unsafe code in parsers it quite dangerous. Binary format parsers are the poster children for memory safety vulnerabilities.
Text format parsers are a bit less dangerous, but having so much unsafe parsing code exposed to untrusted input is still scary.
The text was updated successfully, but these errors were encountered: