From: Frank Lichtenheld <[email protected]>

mingw in Ubuntu 26.04 has issues with checking snprintf
format strings against original MS implementation even
though it uses the GCC implementation.

Apply work-around that is good enough for code that is
already gone in master.

Change-Id: If276bd4c5d07fcd26f6749f514f0257eab73249f
Signed-off-by: Frank Lichtenheld <[email protected]>
Acked-by: Arne Schwabe <[email protected]>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1945
---

This change was reviewed on Gerrit and approved by at least one
developer. I request to merge it to release/2.7.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1945
This mail reflects revision 1 of this Change.

Acked-by according to Gerrit (reflected above):
Arne Schwabe <[email protected]>

        
diff --git a/src/openvpn/proxy.c b/src/openvpn/proxy.c
index 7101d9f..857bf03 100644
--- a/src/openvpn/proxy.c
+++ b/src/openvpn/proxy.c
@@ -767,7 +767,9 @@
 
                 char get[80];
                 CLEAR(buf2);
-                snprintf(get, sizeof(get), "%%*s NTLM %%%zus", sizeof(buf2) - 
1);
+                /* mingw checks calls to the builtin snprintf() with the
+                 * ms_printf archetype, which does not know the 'z' modifier */
+                snprintf(get, sizeof(get), "%%*s NTLM %%%us", (unsigned 
int)(sizeof(buf2) - 1));
                 nparms = sscanf(buf, get, buf2);
 
                 /* check for "Proxy-Authenticate: NTLM TlRM..." */


_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to