-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
crash on Buffer error in v6 #6510
Labels
buffer
Issues and PRs related to the buffer subsystem.
Comments
Thanks for reporting this! I’m looking into it. |
3 tasks
addaleax
added a commit
to addaleax/node
that referenced
this issue
May 3, 2016
Return -1 in `Buffer.lastIndexOf` if the needle is longer than the haystack. The previous check only tested the corresponding condition for forward searches. This applies only to Node.js v6, as `lastIndexOf` was added in it. Fixes: nodejs#6510
@Hamper ... it turns out that we had several issues to resolve in this bit of code. @addaleax did an amazing job of tracking those down and just landed the fix in master. Thank you for reporting the issue! (Note, parts of the issue actually impact v5 and v4 also so we'll be backporting those fixes to those versions). |
evanlucas
pushed a commit
that referenced
this issue
May 17, 2016
Return -1 in `Buffer.lastIndexOf` if the needle is longer than the haystack. The previous check only tested the corresponding condition for forward searches. This applies only to Node.js v6, as `lastIndexOf` was added in it. Fixes: #6510 PR-URL: #6511 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Result:
In v5 last string just return -1.
The text was updated successfully, but these errors were encountered: