summaryrefslogtreecommitdiff
path: root/sys/src/cmd
diff options
context:
space:
mode:
authorSigrid <ftrvxmtrx@gmail.com>2020-12-28 21:21:22 +0100
committerSigrid <ftrvxmtrx@gmail.com>2020-12-28 21:21:22 +0100
commitb7b740a04c3f599c518bdfa606812e75acfc9d80 (patch)
tree53fbb6a9c4a9a97c55ad5b35587a02d743c4550f /sys/src/cmd
parentceeb701a2b93d3f0b96a8b8f945ed5e46d2d0672 (diff)
text2post: check font index for out of range
Diffstat (limited to 'sys/src/cmd')
-rw-r--r--sys/src/cmd/postscript/text2post/text2post.c5
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();