From 0b7beefd0b268c1ec52935937f4abc7e7a3bc3e5 Mon Sep 17 00:00:00 2001 From: Garret Rieger Date: Fri, 22 Nov 2024 01:00:57 +0000 Subject: [PATCH] Raise table growth limit during subsetting. Real case encountered that exceeded the current limit. Fixes #4943. --- src/hb-subset.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hb-subset.cc b/src/hb-subset.cc index 7cea9f183..4e96c9853 100644 --- a/src/hb-subset.cc +++ b/src/hb-subset.cc @@ -295,7 +295,7 @@ _try_subset (const TableType *table, DEBUG_MSG (SUBSET, nullptr, "OT::%c%c%c%c ran out of room; reallocating to %u bytes.", HB_UNTAG (c->table_tag), buf_size); - if (unlikely (buf_size > c->source_blob->length * 16 || + if (unlikely (buf_size > c->source_blob->length * 256 || !buf->alloc (buf_size, true))) { DEBUG_MSG (SUBSET, nullptr, "OT::%c%c%c%c failed to reallocate %u bytes.",