From 6be1377c21bb9c9b4f007377f4f1ade0754e78f9 Mon Sep 17 00:00:00 2001 From: Qingyu Deng Date: Mon, 5 Apr 2021 22:13:58 +0800 Subject: [PATCH] fixup: crypto: reduce range of size to int max --- lib/internal/crypto/random.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/internal/crypto/random.js b/lib/internal/crypto/random.js index 1479ff7cfdf277..83e7fa01a9900a 100644 --- a/lib/internal/crypto/random.js +++ b/lib/internal/crypto/random.js @@ -89,7 +89,6 @@ function assertSize(size, elementSize, offset, length) { } function randomBytes(size, callback) { - const kMaxSize = 2 ** 31 - 1 size = assertSize(size, 1, 0, Infinity); if (callback !== undefined) { validateCallback(callback);