mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-21 15:01:01 +01:00
[layout] Allocate full GSUB/GPOS v1.2 header
GSUB/GPOS subsetting started by allocating only the base v1.0 header, then jumped directly to lookupList2 for v1.2 tables. That can pass a pointer beyond the serializer head to extend_min(), which asserts under fuzzing. Keep the old incremental allocation for v1.0/v1.1 tables so feature variation downgrade snapshots can still trim the tail, but allocate the full version-dependent header before writing v1.2 offsets. Testing: meson test -C build --suite subset Testing: meson test -C build Assisted-by: OpenAI Codex
This commit is contained in:
1 parent
336d65cdab
commit
014ae09d44
1 file changed
+1
-1
@@ -4733,7 +4733,7 @@ struct GSUBGPOS
|
||||
#ifndef HB_NO_BEYOND_64K
|
||||
if (version.to_int () >= 0x00010002u)
|
||||
{
|
||||
if (unlikely (!c->subset_context->serializer->extend_min (&out->lookupList2)))
|
||||
if (unlikely (!c->subset_context->serializer->extend_size (out, get_size ())))
|
||||
return_trace (false);
|
||||
|
||||
out->scriptList = 0;
|
||||
|
||||
Reference in new issue
Block a user