From bfa7cd237fcffd9a001da73e4445f69c2aa5a8fb Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sat, 5 Sep 2026 20:26:14 -0600 Subject: [PATCH] [ttvarc] Fix leak on malformed variation indices. Reported as https://issues.oss-fuzz.com/issues/554721572 * src/truetype/ttvarc.c (tt_varc_parse_component): Route variation-index parse failures through the common cleanup path so heap-allocated component axis values are released. --- src/truetype/ttvarc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/truetype/ttvarc.c b/src/truetype/ttvarc.c index 23c8e2de9..7f4488e4e 100644 --- a/src/truetype/ttvarc.c +++ b/src/truetype/ttvarc.c @@ -836,7 +836,7 @@ { error = read_uint32var( p, limit, &component->axis_values_var_index ); if ( error ) - return error; + goto Fail; } /* read transform variation index */ @@ -844,7 +844,7 @@ { error = read_uint32var( p, limit, &component->transform_var_index ); if ( error ) - return error; + goto Fail; } /* initialize transform to identity */