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 17:41:19 +00:00
parent f3e21a5aa7
commit 0cd5071fba
2 changed files with 22 additions and 1 deletions

View File

@ -1,8 +1,9 @@
# $OpenBSD: Makefile,v 1.2 2021/03/27 17:22:37 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.3 2021/08/31 17:41:19 jca Exp $
COMMENT = tools to access human-editable plaintext record files
DISTNAME = recutils-1.8
REVISION = 0
SHARED_LIBS += rec 0.0 # 1.0

View File

@ -0,0 +1,20 @@
$OpenBSD: patch-lib_vasnprintf_c,v 1.1 2021/08/31 17:41:19 jca Exp $
Don't use printf %n.
https://git.savannah.gnu.org/cgit/gnulib.git/commit/lib/vasnprintf.c?id=b954346c6101860c7b462d1b286641d1307afd6c
Index: lib/vasnprintf.c
--- lib/vasnprintf.c.orig
+++ lib/vasnprintf.c
@@ -4871,10 +4871,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 _WIN32 && ! defined __CYGWIN__))
+# if 0
fbp[1] = '%';
fbp[2] = 'n';
fbp[3] = '\0';