diff --git a/lib/buffer.js b/lib/buffer.js index cfe30808106..f8d615ee0c2 100644 --- a/lib/buffer.js +++ b/lib/buffer.js @@ -354,8 +354,6 @@ function fromArrayBuffer(obj, byteOffset, length) { if (length !== length) { length = 0; } else if (length > 0) { - length = (length < Number.MAX_SAFE_INTEGER ? - length : Number.MAX_SAFE_INTEGER); if (length > maxLength) throw new RangeError("'length' is out of bounds"); } else {