seanmonstar / httparse

A push parser for the HTTP 1.x protocol in Rust.
https://docs.rs/httparse
Apache License 2.0
573 stars 113 forks source link

Fix off-by-one error #75

Closed Hawk777 closed 4 years ago

Hawk777 commented 4 years ago

If len = pos + 8, then there are exactly eight bytes available.

seanmonstar commented 4 years ago

Good catch! What do you think if we added a couple unit tests to this file that would catch this?

Hawk777 commented 4 years ago

Something like 7a7d9af6adab0983c335129f52066fea0499eea6?