From c09417a2b1c80fbd6104f74019e684c13ebf9ec2 Mon Sep 17 00:00:00 2001 From: Matteo Collina Date: Tue, 30 Dec 2025 20:03:23 +0100 Subject: [PATCH] zlib: add CHECK to validate fast path input MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/61175 Reviewed-By: Colin Ihrig Reviewed-By: René Reviewed-By: Luigi Pinca --- src/node_zlib.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/node_zlib.cc b/src/node_zlib.cc index 1adbb7dda37..726e7e2d4e8 100644 --- a/src/node_zlib.cc +++ b/src/node_zlib.cc @@ -1685,6 +1685,7 @@ static uint32_t FastCRC32(v8::Local 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); }