[base] Avoid some memory zeroing.

* src/base/ftrfork.c (FT_Raccess_Get_DataOffsets): Use FT_QNEW_ARRAY.
* src/base/ftsnames.c (FT_Get_Sfnt_{Name,LangTag}): Ditto.
wl/meson-logging
Alexei Podtelezhnikov 4 years ago
parent c2d283143a
commit 270ff52f62
  1. 7
      ChangeLog
  2. 2
      src/base/ftrfork.c
  3. 4
      src/base/ftsnames.c

@ -1,3 +1,10 @@
2021-04-25 Alexei Podtelezhnikov <apodtele@gmail.com>
[base] Avoid some memory zeroing.
* src/base/ftrfork.c (FT_Raccess_Get_DataOffsets): Use FT_QNEW_ARRAY.
* src/base/ftsnames.c (FT_Get_Sfnt_{Name,LangTag}): Ditto.
2021-04-25 Alexei Podtelezhnikov <apodtele@gmail.com>
[bdf,pcf] Avoid some memory zeroing.

@ -299,7 +299,7 @@
j, ref[j].res_id, ref[j].offset ));
}
if ( FT_NEW_ARRAY( offsets_internal, *count ) )
if ( FT_QNEW_ARRAY( offsets_internal, *count ) )
goto Exit;
/* XXX: duplicated reference ID,

@ -65,7 +65,7 @@
FT_Stream stream = face->stream;
if ( FT_NEW_ARRAY ( entry->string, entry->stringLength ) ||
if ( FT_QNEW_ARRAY ( entry->string, entry->stringLength ) ||
FT_STREAM_SEEK( entry->stringOffset ) ||
FT_STREAM_READ( entry->string, entry->stringLength ) )
{
@ -121,7 +121,7 @@
FT_Stream stream = face->stream;
if ( FT_NEW_ARRAY ( entry->string, entry->stringLength ) ||
if ( FT_QNEW_ARRAY ( entry->string, entry->stringLength ) ||
FT_STREAM_SEEK( entry->stringOffset ) ||
FT_STREAM_READ( entry->string, entry->stringLength ) )
{

Loading…
Cancel
Save