Commit 57359cd1 authored by Evan Lucas's avatar Evan Lucas
Browse files

fs: don't throw in read if buffer too big

If the resulting buffer.toString() call in fs.read throws, catch the
error and pass it back in the callback.

This issue only presents itself when fs.read is called using the legacy
string interface:

fs.read(fd, length, position, encoding, callback)

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


Reviewed-By: default avatarTrevor Norris <trev.norris@gmail.com>
parent f4c0ed4a
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