[bdf] Don't left-shift negative numbers.

Reported as

  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2031

* src/bdf/bdfdrivr.c (BDF_Face_Init): Use multiplication.
This commit is contained in:
Werner Lemberg 2017-06-02 09:16:52 +02:00
parent 47a03e9b23
commit 03b0cc2ea9
2 changed files with 12 additions and 2 deletions

View File

@ -1,3 +1,13 @@
2017-06-02 Werner Lemberg <wl@gnu.org>
[bdf] Don't left-shift negative numbers.
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2031
* src/bdf/bdfdrivr.c (BDF_Face_Init): Use multiplication.
2017-06-02 Werner Lemberg <wl@gnu.org>
[bdf] Fix integer scanning routines.

View File

@ -455,11 +455,11 @@ THE SOFTWARE.
bsize->size =
(FT_Pos)( ( prop->value.l * 64 * 7200 + 36135L ) / 72270L );
else
bsize->size = bsize->width << 6;
bsize->size = bsize->width * 64;
prop = bdf_get_font_property( font, "PIXEL_SIZE" );
if ( prop )
bsize->y_ppem = (FT_Short)prop->value.l << 6;
bsize->y_ppem = (FT_Short)prop->value.l * 64;
prop = bdf_get_font_property( font, "RESOLUTION_X" );
if ( prop )