Commit 288f4c22 authored by Trevor Norris's avatar Trevor Norris Committed by Myles Borins
Browse files

buffer: properly retrieve binary length of needle

If the needle contains an extended latin-1 character then using
String::Utf8Length() will be too large and the search will return early.
Instead use String::Length() when encoding is BINARY.

PR-URL: https://github.com/nodejs/node/pull/4803


Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
parent bee86bbb
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment