From: Howard Chu Date: Thu, 4 Apr 2024 06:15:24 +0000 (+0100) Subject: ITS#10198 Win32 mdb_strerror - stop passing "ignored" parameter X-Git-Tag: LMDB_0.9.33~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d3ae7c36e56e29f227e26f1fea5809f11288124e;p=thirdparty%2Fopenldap.git 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. --- 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)