* src/sfnt/ttload.c (tt_face_load_name): Accounting fix.

Fallout reported as
  https://crbug.com/40024
hdmx-advances
Alexei Podtelezhnikov 3 years ago
parent c71eb22dde
commit afd1cb2881
  1. 7
      src/sfnt/ttload.c

@ -956,6 +956,7 @@
{
TT_Name entry = table->names;
FT_UInt count = table->numNameRecords;
FT_UInt valid = 0;
for ( ; count > 0; count-- )
@ -991,15 +992,15 @@
/* mark the string as not yet converted */
entry->string = NULL;
valid++;
entry++;
}
/* reduce array size to the actually used elements */
count = (FT_UInt)( entry - table->names );
FT_MEM_QRENEW_ARRAY( table->names,
table->numNameRecords,
count );
table->numNameRecords = count;
valid );
table->numNameRecords = valid;
}
FT_FRAME_EXIT();

Loading…
Cancel
Save