From d3ae7c36e56e29f227e26f1fea5809f11288124e Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Thu, 4 Apr 2024 07:15:24 +0100 Subject: [PATCH] ITS#10198 Win32 mdb_strerror - stop passing "ignored" parameter The M$ docs say the parameter is ignored, but it actually isn't, and will cause a SEGV if the pointed memory isn't an init'd va_list. --- libraries/liblmdb/mdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index 53e1b4c257..6fc72631dd 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -1555,7 +1555,7 @@ mdb_strerror(int err) buf[0] = 0; FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, err, 0, ptr, MSGSIZE, (va_list *)buf+MSGSIZE); + NULL, err, 0, ptr, MSGSIZE, NULL); return ptr; #else if (err < 0) -- 2.47.2