[truetype] Avoid sanitizer warning (#57289).

* src/truetype/ttpload.c (tt_face_get_device_metrics): Use
`FT_OFFSET'.
This commit is contained in:
Werner Lemberg 2019-11-23 11:09:40 +01:00
parent c67b9a1c5b
commit 9df460b632
2 changed files with 8 additions and 1 deletions

View File

@ -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).

View File

@ -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++ )