ref: 720ae67f35701819f6bf3fd9337dc89079a4ed27
parent: ced9c311f6915cb4d0aa248c1d70d32f44484e33
author: Werner Lemberg <[email protected]>
date: Sun Aug 5 03:21:10 EDT 2018
* src/truetype/ttgload.c (compute_glyph_metrics): Fix overflow. Reported as https://bugs.chromium.org/p/chromium/issues/detail?id=777151
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2018-08-05 Werner Lemberg <[email protected]>
+
+ * src/truetype/ttgload.c (compute_glyph_metrics): Fix overflow.
+
+ Reported as
+
+ https://bugs.chromium.org/p/chromium/issues/detail?id=777151
+
2018-08-04 Werner Lemberg <[email protected]>
* src/truetype/ttinterp.c (opcode_name): Fix typos.
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -2284,13 +2284,13 @@
/* XXX: for now, we have no better algorithm for the lsb, but it */
/* should work fine. */
/* */
- glyph->metrics.vertBearingX = glyph->metrics.horiBearingX -
- glyph->metrics.horiAdvance / 2;
+ glyph->metrics.vertBearingX = SUB_LONG( glyph->metrics.horiBearingX,
+ glyph->metrics.horiAdvance / 2 );
glyph->metrics.vertBearingY = top;
glyph->metrics.vertAdvance = advance;
}
- return 0;
+ return FT_Err_Ok;
}