fix oss-fuzz issue 14345

This commit is contained in:
Michiharu Ariza 2019-04-18 14:53:35 -07:00 committed by Behdad Esfahbod
parent 63a2108480
commit ba0386060d
2 changed files with 2 additions and 1 deletions

View File

@ -110,7 +110,8 @@ struct Encoding1 {
{ {
if (glyph <= ranges[i].nLeft) if (glyph <= ranges[i].nLeft)
{ {
return (hb_codepoint_t)ranges[i].first + glyph; hb_codepoint_t code = (hb_codepoint_t)ranges[i].first + glyph;
return (likely (code < 0x100)? code: CFF_UNDEF_CODE);
} }
glyph -= (ranges[i].nLeft + 1); glyph -= (ranges[i].nLeft + 1);
} }