mirror of
https://github.com/nodejs/node.git
synced 2026-11-26 21:58:26 -05:00
zlib: add CHECK to validate fast path input
PR-URL: https://github.com/nodejs/node/pull/61175 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: René <contact.9a5d6388@renegade334.me.uk> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
1 parent
86bce15e96
commit
c09417a2b1
1 file changed
+1
@@ -1685,6 +1685,7 @@ static uint32_t FastCRC32(v8::Local<v8::Value> receiver,
|
||||
v8::FastApiCallbackOptions& options) {
|
||||
TRACK_V8_FAST_API_CALL("zlib.crc32");
|
||||
v8::HandleScope handle_scope(options.isolate);
|
||||
CHECK(data->IsArrayBufferView() || data->IsString());
|
||||
return CRC32Impl(options.isolate, data, value);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user