buffer: fix range checking for slowToString · nodejs/node@08a3f29 · GitHub
Skip to content

Commit 08a3f29

Browse files
Matt Loringrvagg
authored andcommitted
buffer: fix range checking for slowToString
If `start` is not a valid number in the range, then the default value zero will be used. Same way, if `end` is not a valid number in the accepted range, then, by default, the length of the buffer is assumed. Fixes: #2668 Ref: #2919 PR-URL: #4019 Reviewed-By: Trevor Norris <trev.norris@gmail.com>
1 parent 8a5e434 commit 08a3f29

2 files changed

Lines changed: 27 additions & 6 deletions

File tree

lib/buffer.js

Lines changed: 26 additions & 5 deletions

src/node_internals.h

Lines changed: 1 addition & 1 deletion

0 commit comments

Comments
 (0)