[truetype] Avoid sanitizer warning (#57289).

* src/truetype/ttpload.c (tt_face_get_device_metrics): Use
`FT_OFFSET'.
GSoC-2020-greg
Werner Lemberg 5 years ago
parent c67b9a1c5b
commit 9df460b632
  1. 7
      ChangeLog
  2. 2
      src/truetype/ttpload.c

@ -1,3 +1,10 @@
2019-11-23 Werner Lemberg <wl@gnu.org>
[truetype] Avoid sanitizer warning (#57289).
* src/truetype/ttpload.c (tt_face_get_device_metrics): Use
`FT_OFFSET'.
2019-11-23 Armin Hasitzka <prince.cherusker@gmail.com>
[truetype] Fix integer overflow (#57287).

@ -633,7 +633,7 @@
FT_UInt nn;
FT_Byte* result = NULL;
FT_ULong record_size = face->hdmx_record_size;
FT_Byte* record = face->hdmx_table + 8;
FT_Byte* record = FT_OFFSET( face->hdmx_table, 8 );
for ( nn = 0; nn < face->hdmx_record_count; nn++ )

Loading…
Cancel
Save