GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fs: accept non-32-bit length in writeBuffer · nodejs/node@fe6e5e4

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src
    • node_file.cc
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/node_file.cc‎

Copy file name to clipboardExpand all lines: src/node_file.cc
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1832,8 +1832,8 @@ static void WriteBuffer(const FunctionCallbackInfo<Value>& args) {
18321832
CHECK_LE(static_cast<uint64_t>(off_64), buffer_length);
18331833
const size_t off = static_cast<size_t>(off_64);
18341834

1835-
CHECK(args[3]->IsInt32());
1836-
const size_t len = static_cast<size_t>(args[3].As<Int32>()->Value());
1835+
CHECK(IsSafeJsInt(args[3]));
1836+
const size_t len = static_cast<size_t>(args[3].As<Integer>()->Value());
18371837
CHECK(Buffer::IsWithinBounds(off, len, buffer_length));
18381838
CHECK_LE(len, buffer_length);
18391839
CHECK_GE(off + len, off);

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.