Files
node/lib
Sakthipriyan Vairamani (thefourtheye) f83d035c50 buffer: convert offset & length to int properly
As per ecma-262 2015's #sec-%typedarray%-buffer-byteoffset-length,
  `offset` would be an integer, not a 32 bit unsigned integer. Also,
  `length` would be an integer with the maximum value of 2^53 - 1, not a
  32 bit unsigned integer.

  This would be a problem because, if we create a buffer from an
  arraybuffer, from an offset which is greater than 2^32, it would be
  actually pointing to a different location in arraybuffer. For example,
  if we use 2^40 as offset, then the actual value used will be 0,
  because `byteOffset >>>= 0` will convert `byteOffset` to a 32 bit
  unsigned int, which is based on 2^32 modulo.

  This is a redo, as the ca37fa527f broke
  CI.

  Refer: https://github.com/nodejs/node/pull/9814
  Refer: https://github.com/nodejs/node/pull/9492

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

  Reviewed-By: Michaël Zasso <targos@protonmail.com>
  Reviewed-By: Trevor Norris <trev.norris@gmail.com>
  Reviewed-By: James M Snell <jasnell@gmail.com>
  Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  Reviewed-By: Matteo Collina <matteo.collina@gmail.com>

Backport-Of: https://github.com/nodejs/node/pull/9815
PR-URL: https://github.com/nodejs/node/pull/11176
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-03-08 17:10:14 -08:00
..
2015-10-08 17:32:08 -07:00
2016-11-11 14:58:44 -05:00
2016-12-20 14:42:45 -05:00
2016-09-13 17:04:42 -07:00
2016-12-21 13:58:05 -05:00
2017-01-31 17:07:49 -05:00
2016-07-05 22:09:12 +02:00
2016-10-11 12:31:51 -04:00
2016-10-11 12:31:51 -04:00
2016-08-11 10:58:11 -04:00
2017-01-31 17:07:48 -05:00
2016-11-22 15:01:58 +08:00
2016-10-11 12:31:51 -04:00