ref: b7b740a04c3f599c518bdfa606812e75acfc9d80
parent: ceeb701a2b93d3f0b96a8b8f945ed5e46d2d0672
author: Sigrid <[email protected]>
date: Mon Dec 28 16:21:22 EST 2020
text2post: check font index for out of range
--- a/sys/src/cmd/postscript/text2post/text2post.c
+++ b/sys/src/cmd/postscript/text2post/text2post.c
@@ -325,6 +325,11 @@
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();