From 5365898e9a56b9fd21a6e6788b0f7b1c7cc5d536 Mon Sep 17 00:00:00 2001 From: jca Date: Tue, 31 Aug 2021 18:07:55 +0000 Subject: [PATCH] Don't use printf %n gnulib possible use of %n at runtime deduced from a report by naddy@ --- math/pspp/Makefile | 3 ++- math/pspp/patches/patch-gl_vasnprintf_c | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 math/pspp/patches/patch-gl_vasnprintf_c diff --git a/math/pspp/Makefile b/math/pspp/Makefile index e1a4ab1c1cd..c9ab33d8e9e 100644 --- a/math/pspp/Makefile +++ b/math/pspp/Makefile @@ -1,7 +1,8 @@ -# $OpenBSD: Makefile,v 1.8 2021/03/18 13:44:38 ajacoutot Exp $ +# $OpenBSD: Makefile,v 1.9 2021/08/31 18:07:55 jca Exp $ COMMENT = program for statistical analysis of sampled data DISTNAME = pspp-1.4.1 +REVISION = 0 CATEGORIES = math x11 HOMEPAGE = https://www.gnu.org/software/pspp/ diff --git a/math/pspp/patches/patch-gl_vasnprintf_c b/math/pspp/patches/patch-gl_vasnprintf_c new file mode 100644 index 00000000000..9bef37c8f5e --- /dev/null +++ b/math/pspp/patches/patch-gl_vasnprintf_c @@ -0,0 +1,21 @@ +$OpenBSD: patch-gl_vasnprintf_c,v 1.1 2021/08/31 18:07:55 jca Exp $ + +Don't use printf %n. +https://git.savannah.gnu.org/cgit/gnulib.git/commit/lib/vasnprintf.c?id=b954346c6101860c7b462d1b286641d1307afd6c + +Index: gl/vasnprintf.c +--- gl/vasnprintf.c.orig ++++ gl/vasnprintf.c +@@ -5117,11 +5117,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, + #endif + *fbp = dp->conversion; + #if USE_SNPRINTF +-# if ! (((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) \ +- && !defined __UCLIBC__) \ +- || (defined __APPLE__ && defined __MACH__) \ +- || defined __ANDROID__ \ +- || (defined _WIN32 && ! defined __CYGWIN__)) ++# if 0 + fbp[1] = '%'; + fbp[2] = 'n'; + fbp[3] = '\0';