Skip to content

Commit 2f7a8b0

Browse files
author
Archkon
committed
process: validate resource stats array offsets
Assert that the internally allocated Float64Array views used by CPU, thread CPU, memory, and resource statistics have zero byte offsets. Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com>
1 parent 985aa07 commit 2f7a8b0

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/node_process_methods.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ inline Local<ArrayBuffer> get_fields_array_buffer(
107107
CHECK(args[index]->IsFloat64Array());
108108
Local<Float64Array> arr = args[index].As<Float64Array>();
109109
CHECK_EQ(arr->Length(), array_length);
110+
CHECK_EQ(arr->ByteOffset(), 0);
110111
return arr->Buffer();
111112
}
112113

0 commit comments

Comments
 (0)