File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -732,6 +732,7 @@ class ZlibStream final : public CompressionStream<ZlibContext> {
732732
733733 CHECK (args[4 ]->IsUint32Array ());
734734 Local<Uint32Array> array = args[4 ].As <Uint32Array>();
735+ CHECK_GE (array->Length (), 2 );
735736 Local<ArrayBuffer> ab = array->Buffer ();
736737 uint32_t * write_result = static_cast <uint32_t *>(ab->Data ());
737738
@@ -805,6 +806,7 @@ class BrotliCompressionStream final :
805806 CHECK (args.Length () == 3 && " init(params, writeResult, writeCallback)" );
806807
807808 CHECK (args[1 ]->IsUint32Array ());
809+ CHECK_GE (args[1 ].As <Uint32Array>()->Length (), 2 );
808810 uint32_t * write_result = reinterpret_cast <uint32_t *>(Buffer::Data (args[1 ]));
809811
810812 CHECK (args[2 ]->IsFunction ());
@@ -886,6 +888,7 @@ class ZstdStream final : public CompressionStream<CompressionContext> {
886888 ASSIGN_OR_RETURN_UNWRAP (&wrap, args.This ());
887889
888890 CHECK (args[2 ]->IsUint32Array ());
891+ CHECK_GE (args[2 ].As <Uint32Array>()->Length (), 2 );
889892 uint32_t * write_result = reinterpret_cast <uint32_t *>(Buffer::Data (args[2 ]));
890893
891894 CHECK (args[3 ]->IsFunction ());
You can’t perform that action at this time.
0 commit comments