Skip to content

Commit a3c0014

Browse files
zbjornsonTrott
authored andcommitted
fs: use IsSafeJsInt instead of IsNumber for ftruncate
PR-URL: #26572 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Ujjwal Sharma <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent 0bbda5e commit a3c0014

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/node_file.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1130,7 +1130,7 @@ static void FTruncate(const FunctionCallbackInfo<Value>& args) {
11301130
CHECK(args[0]->IsInt32());
11311131
const int fd = args[0].As<Int32>()->Value();
11321132

1133-
CHECK(args[1]->IsNumber());
1133+
CHECK(IsSafeJsInt(args[1]));
11341134
const int64_t len = args[1].As<Integer>()->Value();
11351135

11361136
FSReqBase* req_wrap_async = GetReqWrap(env, args[2]);

0 commit comments

Comments
 (0)