Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e43aa30

Browse filesBrowse files
tniessenbengl
authored andcommitted
src: remove redundant buffer size check
This condition is already checked by the CHECK_BUFLEN_IN_RANGE macro, so if it was true here, that would contradict the previous check. PR-URL: #42257 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Mestery <mestery@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 063ff08 commit e43aa30
Copy full SHA for e43aa30

File tree

Expand file treeCollapse file tree

1 file changed

+0
-4
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+0
-4
lines changed
Open diff view settings
Collapse file

‎src/string_bytes.cc‎

Copy file name to clipboardExpand all lines: src/string_bytes.cc
-4Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -642,10 +642,6 @@ MaybeLocal<Value> StringBytes::Encode(Isolate* isolate,
642642
switch (encoding) {
643643
case BUFFER:
644644
{
645-
if (buflen > node::Buffer::kMaxLength) {
646-
*error = node::ERR_BUFFER_TOO_LARGE(isolate);
647-
return MaybeLocal<Value>();
648-
}
649645
auto maybe_buf = Buffer::Copy(isolate, buf, buflen);
650646
Local<v8::Object> buf;
651647
if (!maybe_buf.ToLocal(&buf)) {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.