From 185b1a1fd1c8234bda080e9f0b25658b171f5e21 Mon Sep 17 00:00:00 2001 From: Chris Hennick <4961925+Pr0methean@users.noreply.github.com> Date: Fri, 14 Jun 2024 15:32:52 -0700 Subject: [PATCH] perf: Limit the number of extra fields --- src/write.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/write.rs b/src/write.rs index 8e80aa0c..5dbeadd9 100644 --- a/src/write.rs +++ b/src/write.rs @@ -398,7 +398,7 @@ impl<'a> arbitrary::Arbitrary<'a> for FileOptions<'a, ExtendedFileOptions> { options.zopfli_buffer_size = 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| { + u.arbitrary_loop(Some(0), Some(10), |u| { options .add_extra_data( u16::arbitrary(u)?,