-
Notifications
You must be signed in to change notification settings - Fork 64
{Source,Buffer}.indexOf(ByteString, Int) should return start index for empty ByteString #423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
It is not clear though, how If it returns |
I don't think you can get away with returning the start index without first requiring at least that much data to be loaded. The I don't love the idea of returning whatever arbitrary maximum index is available from the |
On a side note -- could you please mention fuzzer in issues found by fuzzer? (so the final bounty list would be easier to compile) |
After all, I convinced myself that For |
For consistency with
CharSequence.indexOf
(which out functions are mimicking),Source.indexOf(BS, Int)
andBuffer.indexOf(BS, Int)
should return a start index (0
, by default) when byte string to search is empty.Currently, both functions return
0
(disregardstartIndex
value).The text was updated successfully, but these errors were encountered: