From patchwork Wed Dec 28 11:07:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Lichtenheld X-Patchwork-Id: 2956 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7300:c95:b0:82:e4b3:40a0 with SMTP id p21csp3240237dyk; Wed, 28 Dec 2022 03:08:53 -0800 (PST) X-Google-Smtp-Source: AMrXdXvaIAm6mDqKTksYEA1TUHUMlitEL9ziKD7Lo8PLZFdHi6Lh4b4YVdIjrqXHcXc1Qd58tdwa X-Received: by 2002:a05:6a20:d496:b0:a7:a3cf:ddce with SMTP id im22-20020a056a20d49600b000a7a3cfddcemr28736918pzb.21.1672225732953; Wed, 28 Dec 2022 03:08:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672225732; cv=none; d=google.com; s=arc-20160816; b=wzUQkGyhIKPs4cSlDJHYLhJcWl+dQT9NPitJL6c9FbIHSpCL1oc87WZi2OVb0FHXWz b7lBpojlax+pJdoNiXt6fQUfpcDYmcT8n0Bba0Tji8YUA+YdWdRFEEF9u6+HTOSQ2dla LFo3ptelQku+xiF5ojeAuP0RCMLzCWsUT6kMUfTs4aNt27hSJSALmQ4ek2Gm63Fa4ybr ZWj7rEzernthF5oG/n2CDGk+xXTi4CNN8nj9VQxGMBhIGmiYM2xR/gqY2xVqphnaOjIk x9dQ3ZCZoksFvJarh9H9m02sVbuyWzi8em2mJZ6Sy513cBRz6EcneL/mZE7OosuxBeHR /M6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:message-id:date:to:from:dkim-signature:dkim-signature; bh=3HfKpTPTcHEuy+mORaUI78KrxsYi7acUxF15/rGBdRo=; b=zPyj6MC5QWksl5/l8eilxxQ9LmlZSzYGtZaWA/7tNCPuZ6ZvFG3WK8l5knLqBr1Aj5 D5E9Wn53YZvVF1FPAjf7gpAEYTREFrRPFGtAXpgruYjmaskb5qDKEbTQjjhIwIbN4sW4 ylCiaZaefgE6tdQOJKpNTyXXkbGDrsaoiVZYBEPZGEib9/ngWqvPlCEkl0EMo2xm2f08 8UvFZi7eqHUtlDJKlhnf6TceShSbLQtCYRaRBpSw9VpkkfgFuWlVrHT2qKbU/Hs6qFCO bDAmnUSaUEaRQnlnjuwmCQdtEAaOdA++c+s8KOFSMVJcG4EU/LjP+q5OAXvPQQhkJBhN v3DA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=e5UQXQ4l; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=djOmqyuN; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id x13-20020a170902ec8d00b001925c7e51d4si15978120plg.462.2022.12.28.03.08.52 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Dec 2022 03:08:52 -0800 (PST) Received-SPF: pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=e5UQXQ4l; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=djOmqyuN; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1pAUIM-0008JK-0j; Wed, 28 Dec 2022 11:08:26 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1pAUI5-0008J4-4s for openvpn-devel@lists.sourceforge.net; Wed, 28 Dec 2022 11:08:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:Message-Id: Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Z1qEFOfsFLw5HqxYcwGuKDA6+uUh2/voL5DzuDbczrc=; b=e5UQXQ4lvqfCt4tuyz2vISaMWj Ot6hrdPye0aJAGs1XqvrHrO0P68ufkVSazJYooq1v2wnqRIa1ANPBpcid9swDteEMfeYRHoHFAOF5 VdiC2DOsZ562BxFAv3DdCjGiUoDw3iEE4m8nUGno21kLkokz3N8H9nbe3fySZrNnC7bk=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject:To:From: Sender:Reply-To:Cc:Content-Type:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=Z1qEFOfsFLw5HqxYcwGuKDA6+uUh2/voL5DzuDbczrc=; b=d jOmqyuNCaRwqVRoPlJkIdX5/xdZh6CDP50K6IGfuCYVYk3lwtomUG177cr9ntARFwk0NnKKSxVK5d GkC1ufizQuUYwlr1rgFyZjGLvtULyEoYrn96ibeOXSRWRM2xGtVM2kjSp/yHnd2e5pFrCGQvN7SX0 V0A+lythx/V9cZ1M=; Received: from mout-p-201.mailbox.org ([80.241.56.171]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1pAUI0-0001hP-Mv for openvpn-devel@lists.sourceforge.net; Wed, 28 Dec 2022 11:08:06 +0000 Received: from smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4Nhpf071bcz9sT3 for ; Wed, 28 Dec 2022 12:07:52 +0100 (CET) From: Frank Lichtenheld To: openvpn-devel@lists.sourceforge.net Date: Wed, 28 Dec 2022 12:07:52 +0100 Message-Id: <20221228110752.34060-1-frank@lichtenheld.com> MIME-Version: 1.0 X-Spam-Score: -0.7 (/) X-Spam-Report: Spam detection software, running on the system "util-spamd-2.v13.lw.sourceforge.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 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. Content analysis details: (-0.7 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [80.241.56.171 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record X-Headers-End: 1pAUI0-0001hP-Mv Subject: [Openvpn-devel] [PATCH] options.c: fix format security error when compiling without optimization X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1753455770028328642?= X-GMAIL-MSGID: =?utf-8?q?1753455770028328642?= 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 --- src/openvpn/options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openvpn/options.c b/src/openvpn/options.c index e454b2ac..7395019e 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