From 362a1123b574c152df07593d22a4d994e1c20786 Mon Sep 17 00:00:00 2001 From: Chris Hennick <4961925+Pr0methean@users.noreply.github.com> Date: Tue, 4 Jun 2024 08:38:05 -0700 Subject: [PATCH] ci(fuzz): Limit Zopfli buffer size to fix OOMEs --- src/write.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/write.rs b/src/write.rs index 5da1da722..2b468a4c2 100644 --- a/src/write.rs +++ b/src/write.rs @@ -288,7 +288,7 @@ impl<'a> arbitrary::Arbitrary<'a> for FileOptions<'a, ExtendedFileOptions> { #[cfg(feature = "deflate-zopfli")] if options.compression_method == CompressionMethod::Deflated && bool::arbitrary(u)? { options.zopfli_buffer_size = - Some(if bool::arbitrary(u)? { 2 } else { 3 } << u.int_in_range(8..=29)?); + Some(if bool::arbitrary(u)? { 2 } else { 3 } << u.int_in_range(8..=20)?); } u.arbitrary_loop(Some(0), Some((u16::MAX / 4) as u32), |u| { options