We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2aff77f commit fe6e5e4Copy full SHA for fe6e5e4
src/node_file.cc
@@ -1832,8 +1832,8 @@ static void WriteBuffer(const FunctionCallbackInfo<Value>& args) {
1832
CHECK_LE(static_cast<uint64_t>(off_64), buffer_length);
1833
const size_t off = static_cast<size_t>(off_64);
1834
1835
- CHECK(args[3]->IsInt32());
1836
- const size_t len = static_cast<size_t>(args[3].As<Int32>()->Value());
+ CHECK(IsSafeJsInt(args[3]));
+ const size_t len = static_cast<size_t>(args[3].As<Integer>()->Value());
1837
CHECK(Buffer::IsWithinBounds(off, len, buffer_length));
1838
CHECK_LE(len, buffer_length);
1839
CHECK_GE(off + len, off);
0 commit comments