text2post: check font index for out of range
This commit is contained in:
parent
ceeb701a2b
commit
b7b740a04c
1 changed files with 5 additions and 0 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in a new issue