freetype2/src/truetype
Ben Wagner 262b47ac5a [truetype] Keep variation store consistent.
`tt_var_load_item_variation_store` fills out a `GX_ItemVarStore`.  While it
may return an error, the item store must be left in a consistent state so
that any use or destruction of the item store can properly use or free the
data in it.  Before this change the counts from the font data were read
directly into the item store before the actual allocation of the arrays to
which they referred.  There exist many opportunities between the time the
counts are read and the arrays are allocated to return early due to invalid
data.  When this happened the item store claimed to have entires it actually
did not, leading to crashes later when it was used.

Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=54449

* src/truetype/ttgxvar.c (tt_var_load_item_variation_store): Read the counts
into local variables and store them in the item store only after the related
arrays are actually created on the item store.
2023-01-06 07:11:41 +01:00
..
module.mk Update all copyright notices. 2022-01-11 10:54:10 +01:00
rules.mk Update all copyright notices. 2022-01-11 10:54:10 +01:00
truetype.c Update all copyright notices. 2022-01-11 10:54:10 +01:00
ttdriver.c Proposal: Feature control for variable COLRv1 2022-06-21 12:25:46 +03:00
ttdriver.h Update all copyright notices. 2022-01-11 10:54:10 +01:00
tterrors.h Update all copyright notices. 2022-01-11 10:54:10 +01:00
ttgload.c * src/truetype/ttgload.c: Cosmetic changes. 2022-10-21 15:55:30 +00:00
ttgload.h Update all copyright notices. 2022-01-11 10:54:10 +01:00
ttgxvar.c [truetype] Keep variation store consistent. 2023-01-06 07:11:41 +01:00
ttgxvar.h [build] fix for make multi 2022-11-08 14:23:37 +09:00
ttinterp.c Minor formatting. 2022-07-01 06:33:50 +02:00
ttinterp.h Update all copyright notices. 2022-01-11 10:54:10 +01:00
ttobjs.c [truetype] Fix 'sbix' table handling. 2022-03-25 06:37:41 +00:00
ttobjs.h Proposal: Feature control for variable COLRv1 2022-06-21 12:25:46 +03:00
ttpload.c Update all copyright notices. 2022-01-11 10:54:10 +01:00
ttpload.h Update all copyright notices. 2022-01-11 10:54:10 +01:00
ttsubpix.c Update all copyright notices. 2022-01-11 10:54:10 +01:00
ttsubpix.h Update all copyright notices. 2022-01-11 10:54:10 +01:00