Don't use printf %n

gnulib possible use of %n at runtime deduced from a report by naddy@
This commit is contained in:
jca 2021-08-31 18:07:55 +00:00
parent 234bdcd461
commit 5365898e9a
2 changed files with 23 additions and 1 deletions

View File

@ -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/

View File

@ -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';