math/yorick: avoid printf %n. The remaining %n in this port end up in

*scanf() and fputs() (YError() chasing done by naddy)

ok naddy
This commit is contained in:
tb 2021-09-15 21:53:13 +00:00
parent 34bcb36b3a
commit 2433f9818f
2 changed files with 16 additions and 2 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.28 2019/07/12 20:47:47 sthen Exp $
# $OpenBSD: Makefile,v 1.29 2021/09/15 21:53:13 tb Exp $
# Memory hog, stuck for days on the same file during build.
NOT_FOR_ARCHS= sh
@ -7,7 +7,7 @@ COMMENT= interpreted language for scientific computing
VERSION= 2.1.06
DISTNAME= yorick-${VERSION}
REVISION = 3
REVISION = 4
CATEGORIES= math devel

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-play_x11_fonts_c,v 1.1 2021/09/15 21:53:13 tb Exp $
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) */