diff --git a/src/node_file.cc b/src/node_file.cc index bbef6f8e898c78..68dec74fb81088 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -1930,7 +1930,7 @@ static void ReadFileSync(const FunctionCallbackInfo& args) { FS_SYNC_TRACE_BEGIN(read); while (true) { - auto r = uv_fs_read(nullptr, &req, file, &buf, 1, result.length(), nullptr); + auto r = uv_fs_read(nullptr, &req, file, &buf, 1, -1, nullptr); if (req.result < 0) { FS_SYNC_TRACE_END(read); // req will be cleaned up by scope leave.