In function parse_font_matrix(), make sure that the units per em value is assigned an unsigned short value, first by shifting right 16 bits, then by casting the results to FT_UShort.