[truetype] Fix numeric overflow (#55103).

* src/truetype/ttgload.c (compute_glyph_metrics): Use `SUB_LONG'.
This commit is contained in:
Ben Wagner 2018-11-27 17:55:40 +01:00 committed by Werner Lemberg
parent 1c4004bb34
commit 74cdd75f6f
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2018-11-27 Ben Wagner <bungeman@google.com>
[truetype Fix numeric overflow (#55103).
* src/truetype/ttgload.c (compute_glyph_metrics): Use `SUB_LONG'.
2018-11-18 Alexei Podtelezhnikov <apodtele@gmail.com>
[builds] Belated DLL support with vc2002-vc2008.

View File

@ -2160,7 +2160,7 @@
glyph->metrics.horiBearingX = bbox.xMin;
glyph->metrics.horiBearingY = bbox.yMax;
glyph->metrics.horiAdvance = loader->pp2.x - loader->pp1.x;
glyph->metrics.horiAdvance = SUB_LONG(loader->pp2.x, loader->pp1.x);
/* Adjust advance width to the value contained in the hdmx table */
/* unless FT_LOAD_COMPUTE_METRICS is set or backward compatibility */