From f0b9f2ef373f0da6d3b75847a241612e7ed32d68 Mon Sep 17 00:00:00 2001 From: +merlan #flirora Date: Fri, 18 Aug 2023 16:51:26 -0400 Subject: [PATCH] Buffer: match work limits with HarfBuzz 2.7.4 HarfBuzz increased work limits for buffers in 2.7.3, causing results for resource exhaustion tests (morx_34_001 and morx_36_001) to change. We match these limits so that these tests pass. See https://github.com/harfbuzz/harfbuzz/commit/1c05f6789b86ae7bf54fb74255b3c8cea31d9978. --- src/buffer.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/buffer.rs b/src/buffer.rs index cc65a0aa..bafd6c62 100644 --- a/src/buffer.rs +++ b/src/buffer.rs @@ -533,13 +533,13 @@ pub struct Buffer { } impl Buffer { - pub const MAX_LEN_FACTOR: usize = 32; - pub const MAX_LEN_MIN: usize = 8192; + pub const MAX_LEN_FACTOR: usize = 64; + pub const MAX_LEN_MIN: usize = 16384; // Shaping more than a billion chars? Let us know! pub const MAX_LEN_DEFAULT: usize = 0x3FFFFFFF; - pub const MAX_OPS_FACTOR: i32 = 64; - pub const MAX_OPS_MIN: i32 = 1024; + pub const MAX_OPS_FACTOR: i32 = 1024; + pub const MAX_OPS_MIN: i32 = 16384; // Shaping more than a billion operations? Let us know! pub const MAX_OPS_DEFAULT: i32 = 0x1FFFFFFF;