Fix uninit read in Android TrueType font scan

Problem reported privately by Michal Majchrowicz and Marcin
Wyczechowski, members of the AFINE Team.
* src/sfnt.c (sfnt_read_table_directory):
Fix typo where wrong size was used.
This commit is contained in:
Paul Eggert 2026-07-07 13:36:47 -07:00
parent 95ab9ef627
commit 7621ee1d01

View file

@ -263,7 +263,7 @@ sfnt_read_table_directory (int fd)
rc = read (fd, subtable->subtables, subtable_size);
if (rc == -1 || rc < offset)
if (rc == -1 || rc < subtable_size)
{
xfree (subtable);
return NULL;