There's a few more %n in this code, but as far as I can see, they're all
fed into *scanf or into that complicated thing called YError(). I cannot
tell for sure that this latter will not end up in a *printf()...
Index: Makefile
===================================================================
RCS file: /cvs/ports/math/yorick/Makefile,v
retrieving revision 1.28
diff -u -p -r1.28 Makefile
--- Makefile 12 Jul 2019 20:47:47 -0000 1.28
+++ Makefile 13 Sep 2021 17:29:58 -0000
@@ -7,7 +7,7 @@ COMMENT= interpreted language for scient
VERSION= 2.1.06
DISTNAME= yorick-${VERSION}
-REVISION = 3
+REVISION = 4
CATEGORIES= math devel
Index: patches/patch-play_x11_fonts_c
===================================================================
RCS file: patches/patch-play_x11_fonts_c
diff -N patches/patch-play_x11_fonts_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-play_x11_fonts_c 13 Sep 2021 17:24:31 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: play/x11/fonts.c
+--- play/x11/fonts.c.orig
++++ play/x11/fonts.c
+@@ -100,7 +100,7 @@ x_font(x_display *xdpy, int font, int pixsize)
+ char *pnm = nm;
+ int n = 7;
+ while (n--) while ((*(pnm++)= *(name++))!='-');
+- sprintf(pnm, "%d%n", pixsize, &n);
++ n = sprintf(pnm, "%d", pixsize);
+ strcpy(pnm+n, name);
+ tmp_fonts = XListFonts(xdpy->dpy, nm, 4, &n);
+ if (n<=0) return xdpy->font; /* should never happen (X server bug) */