diff options
author | cjihrig <cjihrig@gmail.com> | 2016-10-28 10:35:58 -0400 |
---|---|---|
committer | cjihrig <cjihrig@gmail.com> | 2016-11-04 20:38:42 -0400 |
commit | a02b13fe9bc13c59a2410c65ce13f7e68a36ccda (patch) | |
tree | 96a2bf22ab8d158611299d7e214066df5d633178 /GOVERNANCE.md | |
parent | 379097850d714494b3cfb92803d79d9999c983ef (diff) | |
download | android-node-v8-a02b13fe9bc13c59a2410c65ce13f7e68a36ccda.tar.gz android-node-v8-a02b13fe9bc13c59a2410c65ce13f7e68a36ccda.tar.bz2 android-node-v8-a02b13fe9bc13c59a2410c65ce13f7e68a36ccda.zip |
buffer: coerce offset using Math.trunc()
This is a partial revert of
14d1a8a631a58408f1e85365a5f2aaa047cc0a5f, which coerced the offset
of Buffer#slice() using the | operator. This causes some edge
cases to be handled incorrectly. This commit restores the old
behavior, but converts offsets to integers using Math.trunc().
This commit does not revert any tests, and adds an additional
regression test.
Refs: https://github.com/nodejs/node/issues/9096
Refs: https://github.com/nodejs/node/pull/9101
PR-URL: https://github.com/nodejs/node/pull/9341
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Diffstat (limited to 'GOVERNANCE.md')
0 files changed, 0 insertions, 0 deletions