Commit 54cd2e1e authored by Trevor Norris's avatar Trevor Norris
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 7240ad44
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