From e93552fa0969951c09297be76f018ff40a0073c1 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 4 Jun 2026 12:28:06 +0200 Subject: [PATCH] [layout] Allocate full GDEF v1.4 header GDEF subsetting started by allocating only the base v1.0 header and then tried to extend the final v1.4 tail field directly. That jumps over the intervening v1.4 offsets and can trip the serializer head assertion under CIFuzz. Keep the existing incremental allocation for v1.2/v1.3 so GDEF downgrade snapshots can still trim those tails, but allocate the full version-dependent header before writing v1.4 offsets. Testing: meson test -C build --suite subset Testing: meson test -C build Assisted-by: OpenAI Codex --- src/OT/Layout/GDEF/GDEF.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OT/Layout/GDEF/GDEF.hh b/src/OT/Layout/GDEF/GDEF.hh index 7747e12f8..0182575d4 100644 --- a/src/OT/Layout/GDEF/GDEF.hh +++ b/src/OT/Layout/GDEF/GDEF.hh @@ -675,7 +675,7 @@ struct GDEF (glyphClassDef2 || attachList2 || ligCaretList2 || markAttachClassDef2 || markGlyphSetsDef2); if (unlikely (version.to_int () >= 0x00010004u && hb_barrier () && - !c->serializer->extend_min (&out->markGlyphSetsDef2))) + !c->serializer->extend_size (out, get_size ()))) return_trace (false); #endif