summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBrian White <mscdex@mscdex.net>2018-11-06 18:16:16 -0500
committerRich Trott <rtrott@gmail.com>2018-11-08 15:22:19 -0800
commit5c201b6d477525a080b11d1bd49a7c94fe81f8ac (patch)
tree7d1a39a7e42ed8fe3dd70aadee3aa0d775f1336a /lib
parent00d412d3b721a91ce7c53fa68f2c457aef3d10cc (diff)
downloadandroid-node-v8-5c201b6d477525a080b11d1bd49a7c94fe81f8ac.tar.gz
android-node-v8-5c201b6d477525a080b11d1bd49a7c94fe81f8ac.tar.bz2
android-node-v8-5c201b6d477525a080b11d1bd49a7c94fe81f8ac.zip
buffer: fix writeUInt16BE range check
Fixes: https://github.com/nodejs/node/issues/24205 PR-URL: https://github.com/nodejs/node/pull/24208 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'lib')
-rw-r--r--lib/internal/buffer.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/internal/buffer.js b/lib/internal/buffer.js
index 61bdced4d6..137ca64142 100644
--- a/lib/internal/buffer.js
+++ b/lib/internal/buffer.js
@@ -667,7 +667,7 @@ function writeU_Int16BE(buf, value, offset, min, max) {
}
function writeUInt16BE(value, offset = 0) {
- return writeU_Int16BE(this, value, offset, 0, 0xffffffff);
+ return writeU_Int16BE(this, value, offset, 0, 0xffff);
}
function writeIntLE(value, offset, byteLength) {