mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
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> PR-URL: https://github.com/nodejs/node/pull/65098 Reviewed-By: René <contact.9a5d6388@renegade334.me.uk> Reviewed-By: Aviv Keller <me@aviv.sh>
This commit is contained in:
1 parent
e624785846
commit
dff2b675db
1 file changed
+1
@@ -107,6 +107,7 @@ inline Local<ArrayBuffer> get_fields_array_buffer(
|
||||
CHECK(args[index]->IsFloat64Array());
|
||||
Local<Float64Array> arr = args[index].As<Float64Array>();
|
||||
CHECK_EQ(arr->Length(), array_length);
|
||||
CHECK_EQ(arr->ByteOffset(), 0);
|
||||
return arr->Buffer();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user