Skip to content

Commit 8765afd

Browse files
Archkonaduh95
authored andcommitted
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 <[email protected]> PR-URL: #65098 Reviewed-By: René <[email protected]> Reviewed-By: Aviv Keller <[email protected]>
1 parent 73de450 commit 8765afd

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)