From: Frank Lichtenheld Date: Wed, 28 Dec 2022 11:07:52 +0000 (+0100) Subject: options.c: fix format security error when compiling without optimization X-Git-Tag: v2.6_rc2~28 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cdcaebcbdf31cb629e54147d476e6fb9921f7999;p=thirdparty%2Fopenvpn.git options.c: fix format security error when compiling without optimization error: format not a string literal and no format arguments [-Werror=format-security] 2309 | msg(M_USAGE, str); Found by accident, since it only happens without optimization. Seems the compiler can figure out that this is harmless when thinking a bit harder about it. Fix anyway. Signed-off-by: Frank Lichtenheld Acked-by: Arne Schwabe Message-Id: <20221228110752.34060-1-frank@lichtenheld.com> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg25848.html Signed-off-by: Gert Doering (cherry picked from commit 24fc4ce25432a42170477f21133bb0f25a8a860d) --- diff --git a/src/openvpn/options.c b/src/openvpn/options.c index e454b2ac0..7395019e3 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -2306,7 +2306,7 @@ check_ca_required(const struct options *options) " or CA path (--capath)" #endif " and/or peer fingerprint verification (--peer-fingerprint)"; - msg(M_USAGE, str); + msg(M_USAGE, "%s", str); } static void