Files
node/test/parallel
Trevor Norris a9d528be5b buffer: fix range checks for slice()
Using the black magic of Symbol.toPrimitive the numeric value of
start/end can be changed when Uint32Value() is called once
Buffer::Fill() is entered. Allowing the CHECK() to be bypassed.

The bug report was only for "start", but the same can be done with
"end". Perform checks for both in node::Buffer::Fill() to make sure the
issue can't be triggered, even if process.binding is used directly.

Include tests for each case. Along with a check to make sure the last
time the value is accessed returns -1. This should be enough to make
sure Buffer::Fill() is receiving the correct value. Along with two tests
against process.binding directly.

Fixes: https://github.com/nodejs/node/issues/9149
PR-URL: https://github.com/nodejs/node/pull/9174
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Franziska Hinkelmann <ranziska.hinkelmann@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-12-20 15:28:35 -05:00
..
2016-10-11 12:52:43 -04:00
2016-12-08 03:03:25 +01:00
2016-12-20 14:42:45 -05:00
2016-12-08 02:51:57 +01:00
2016-12-08 03:03:23 +01:00
2016-10-11 12:52:43 -04:00
2016-07-20 06:36:27 -05:00
2016-10-11 12:52:43 -04:00
2016-07-20 06:36:27 -05:00
2016-07-20 06:36:27 -05:00
2016-10-11 12:26:42 -04:00
2016-12-08 02:51:54 +01:00
2016-10-11 12:30:41 -04:00
2016-12-08 02:52:00 +01:00
2016-07-20 06:36:27 -05:00
2016-04-26 12:15:53 -07:00
2016-07-20 06:36:27 -05:00
2016-07-20 06:36:27 -05:00
2016-12-08 03:02:43 +01:00
2016-10-11 12:28:16 -04:00
2016-12-08 02:33:44 +01:00