Is. #891 Ensure no buffer over-run

Fixes #891
This commit is contained in:
Geoff McLane 2020-11-30 17:54:06 +01:00
parent cb03eedc91
commit 0b18ab6978

View file

@ -724,7 +724,7 @@ static const uint Mac2Unicode[128] =
/* Function to convert from MacRoman to Unicode */
uint TY_(DecodeMacRoman)(uint c)
{
if (127 < c)
if (127 < c && c < 256) /* Is. #891 */
c = Mac2Unicode[c - 128];
return c;
}