diff --git a/src/node_crypto.cc b/src/node_crypto.cc index c9b3a5164f0..bab3b6971cf 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -1313,11 +1313,6 @@ Handle Connection::EncIn(const Arguments& args) { size_t buffer_length = Buffer::Length(args[0]); size_t off = args[1]->Int32Value(); - if (off >= buffer_length) { - return ThrowException(Exception::Error( - String::New("Offset is out of bounds"))); - } - size_t len = args[2]->Int32Value(); if (off + len > buffer_length) { return ThrowException(Exception::Error( @@ -1359,11 +1354,6 @@ Handle Connection::ClearOut(const Arguments& args) { size_t buffer_length = Buffer::Length(args[0]); size_t off = args[1]->Int32Value(); - if (off >= buffer_length) { - return ThrowException(Exception::Error( - String::New("Offset is out of bounds"))); - } - size_t len = args[2]->Int32Value(); if (off + len > buffer_length) { return ThrowException(Exception::Error( @@ -1431,11 +1421,6 @@ Handle Connection::EncOut(const Arguments& args) { size_t buffer_length = Buffer::Length(args[0]); size_t off = args[1]->Int32Value(); - if (off >= buffer_length) { - return ThrowException(Exception::Error( - String::New("Offset is out of bounds"))); - } - size_t len = args[2]->Int32Value(); if (off + len > buffer_length) { return ThrowException(Exception::Error( @@ -1470,11 +1455,6 @@ Handle Connection::ClearIn(const Arguments& args) { size_t buffer_length = Buffer::Length(args[0]); size_t off = args[1]->Int32Value(); - if (off > buffer_length) { - return ThrowException(Exception::Error( - String::New("Offset is out of bounds"))); - } - size_t len = args[2]->Int32Value(); if (off + len > buffer_length) { return ThrowException(Exception::Error(