summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/crypto/crypto_random.cc6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/crypto/crypto_random.cc b/src/crypto/crypto_random.cc
index 272dbdaf7c..9850104cd6 100644
--- a/src/crypto/crypto_random.cc
+++ b/src/crypto/crypto_random.cc
@@ -39,7 +39,6 @@ Maybe<bool> RandomBytesTraits::AdditionalConfig(
const FunctionCallbackInfo<Value>& args,
unsigned int offset,
RandomBytesConfig* params) {
- Environment* env = Environment::GetCurrent(args);
CHECK(IsAnyByteSource(args[offset])); // Buffer to fill
CHECK(args[offset + 1]->IsUint32()); // Offset
CHECK(args[offset + 2]->IsUint32()); // Size
@@ -51,11 +50,6 @@ Maybe<bool> RandomBytesTraits::AdditionalConfig(
CHECK_GE(byte_offset + size, byte_offset); // Overflow check.
CHECK_LE(byte_offset + size, in.size()); // Bounds check.
- if (UNLIKELY(size > INT_MAX)) {
- THROW_ERR_OUT_OF_RANGE(env, "buffer is too large");
- return Nothing<bool>();
- }
-
params->buffer = in.data() + byte_offset;
params->size = size;