Skip to content

Commit c2aaa42

Browse files
committed
zlib: add CHECK to validate fast path input
1 parent b1c01fc commit c2aaa42

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/node_zlib.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1685,6 +1685,7 @@ static uint32_t FastCRC32(v8::Local<v8::Value> receiver,
16851685
v8::FastApiCallbackOptions& options) {
16861686
TRACK_V8_FAST_API_CALL("zlib.crc32");
16871687
v8::HandleScope handle_scope(options.isolate);
1688+
CHECK(data->IsArrayBufferView() || data->IsString());
16881689
return CRC32Impl(options.isolate, data, value);
16891690
}
16901691

0 commit comments

Comments
 (0)