diff options
author | Sigrid <ftrvxmtrx@gmail.com> | 2020-12-28 21:21:22 +0100 |
---|---|---|
committer | Sigrid <ftrvxmtrx@gmail.com> | 2020-12-28 21:21:22 +0100 |
commit | b7b740a04c3f599c518bdfa606812e75acfc9d80 (patch) | |
tree | 53fbb6a9c4a9a97c55ad5b35587a02d743c4550f /sys/src/cmd | |
parent | ceeb701a2b93d3f0b96a8b8f945ed5e46d2d0672 (diff) |
text2post: check font index for out of range
Diffstat (limited to 'sys/src/cmd')
-rw-r--r-- | sys/src/cmd/postscript/text2post/text2post.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/src/cmd/postscript/text2post/text2post.c b/sys/src/cmd/postscript/text2post/text2post.c index 963911305..b8f87994b 100644 --- a/sys/src/cmd/postscript/text2post/text2post.c +++ b/sys/src/cmd/postscript/text2post/text2post.c @@ -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(); |