text2post: check font index for out of range

This commit is contained in:
Sigrid 2020-12-28 21:21:22 +01:00
parent ceeb701a2b
commit b7b740a04c

View file

@ -325,6 +325,11 @@ txt2post(void) {
thischar = r & 0xff;
thisfont = (r>>8) & 0xff;
if (thisfont >= FONTABSIZE) {
Bprint(Bstderr, "font out of range\n");
exits("font");
}
if (line_no == 0 && char_no == 0)
startpage();