If n is large enough to cause wrapping then self.cursor.wrapping_add(n) would likely be less than self.start. Either saturating_add is needed, or a test that n < end - cursor.
https://github.com/seanmonstar/httparse/blob/master/src/iter.rs#L44-L55
Edit: actually saturating_add does not (yet?) exist for pointer arithmetic
If
nis large enough to cause wrapping thenself.cursor.wrapping_add(n)would likely be less than self.start. Either saturating_add is needed, or a test thatn < end - cursor.https://github.com/seanmonstar/httparse/blob/master/src/iter.rs#L44-L55
Edit: actually saturating_add does not (yet?) exist for pointer arithmetic