From patchwork Sat Sep 12 10:23:42 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 5335 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:6446:b0:8a0:ea1f:253a with SMTP id n6csp1436676mag; Sat, 12 Sep 2026 03:24:05 -0700 (PDT) X-Forwarded-Encrypted: i=2; AKwUvBxeIWBC2V4ki6b2xk4dQaIzpJY/cRVfnKzlJBTIr9j93gNCjQsv7a/wyfAbfATa/uK2jfHn7PW9J/Q=@openvpn.net X-Received: by 2002:a05:6808:c2ba:b0:4c0:3322:fc1 with SMTP id 5614622812f47-4c4a9acd340mr1570713b6e.29.1789208645703; Sat, 12 Sep 2026 03:24:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1789208645; cv=none; d=google.com; s=arc-20260327; b=p92uhuKsYvovVl4lsQh0sdRw7HiY6urHTQfmY1FglaSoZ87dfyP4pNYrpvHurZeiVv MOxh3UJYoZuzw2ONaSAv/pXrDGrk9TjvP95pD1L/3AkhahYCwUVUjBydcQ7ri/VjFiUe C/Avjh2SDbKqN40Y89vOx0FtiGph8Mlj1p3YHHbj7Sl5hgMHBPZBx//p7xhbvX43aHGF GUMeaDMuQvvo9x9A8Id4bXXkYhOe4XPm4IcWqnMTtMV7UdlM29ORdq1Ev0igEgJtp1fe Cad6RlksCsc2kHI0H/62QNWhs2ER+e91p5fsLwQQMgUJaZFtx32ThiKIJGhViqWhQRI7 BjyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:dkim-signature:dkim-signature; bh=wccvvQBXsw/1QCDXUhnUbhqMt5jmJAGa+vbCMrxz7ls=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=B2NBlZeIdqyqC6zRAJ3YBNBs3SCC3NuGToTOLFGD0OQ/njCNTn4fLakvjaeIhbBDRW izuR5rLC6uC0zIrooyMlCENXqCoqGi4duJvtw+SypLDH6eozH7PwOaD7bgf/27Oh8Rxw uWyV9Rfkdf+WC3L3sGJZHhE1dHSRJF99Y6P4wGqLqHUfkHiNrkO9I/y9TjbWekKuVv1C F2yFMSmso5A2N6mCkRfzLBIkXIfIdDKvw9v+bk8wmXqiDTjFZ1t/BmOQUxTOD8MAWQR0 aENJ0m7//XVIDBcofslO4Toa6mfgi1ZqwpVs+Bb6uxJNR8N7X9necP8o/+BDSZYYiJSc ypgg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=Z2hZbE8y; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=R2rIkXpj; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b="SHHGY3/y"; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id 5614622812f47-4c3321e1148si5759099b6e.119.2026.09.12.03.24.05 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 12 Sep 2026 03:24:05 -0700 (PDT) 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=pass header.i=@lists.sourceforge.net header.s=beta header.b=Z2hZbE8y; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=R2rIkXpj; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b="SHHGY3/y"; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Subject:MIME-Version:References:In-Reply-To:Message-ID:Date:To:From:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=wccvvQBXsw/1QCDXUhnUbhqMt5jmJAGa+vbCMrxz7ls=; b=Z2hZbE8y077xISM9CMQG/1dnN9 3n8mVpnVkTGymYM7qhiW7LM1QQLuVDiYyMuNoDNG4jRaakQjfPRf+lxFppYh0ON2zloyiRQZt+ipc bzFaAlcssqKdA8t1cRD5kaRxLFpmqtgc5dnkG6LYK2mH0I3d79ilV7i1PnzcOG6AuewE=; Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1x5Ktr-0005gG-EV; Sat, 12 Sep 2026 10:23:59 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1x5Ktp-0005g9-Hj for openvpn-devel@lists.sourceforge.net; Sat, 12 Sep 2026 10:23:57 +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:References: In-Reply-To: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:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=+O7TGrz445XFN95lok4UPqCFaqnWznBpw5a4tXbeF2M=; b=R2rIkXpjJSKJEh5G85k6HNlKNx b95GO1Ii4g6poBOU/tGmcVq89XOX/GQP/hgG94s4qjlaVckCV3yDx2EJU5Kl2ihn8Dt7ldzQ1ap44 buKvyxl3qlvme7/OmAFqX9PTEFv4/Aa8m+6qgoZfHeaf1LNX+NLSi51rR28zqHbKO4/s=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: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:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=+O7TGrz445XFN95lok4UPqCFaqnWznBpw5a4tXbeF2M=; b=SHHGY3/yvUvCknzQEH1LKdFI2P +TRRo7Q9PMkSbEP6jgEwGvnc6oDLgr2LRKICJsPEJr4zZTiBX+0jPXS2YIgFuIu11nBfbiqsOvq2Y GgLzohzpyOl/9blof2pkKGmiqouWNkyFfTPi3P8DmTEHGCDSBvJeYLmHmW8swIXSLrX4=; Received: from [193.149.48.129] (helo=blue.greenie.muc.de) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1x5Kto-0005Vz-0g for openvpn-devel@lists.sourceforge.net; Sat, 12 Sep 2026 10:23:57 +0000 Received: from blue.greenie.muc.de (localhost [127.0.0.1]) by blue.greenie.muc.de (8.18.1/8.18.1) with ESMTP id 68CANnht000439 for ; Sat, 12 Sep 2026 12:23:49 +0200 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.2/8.18.1/Submit) id 68CANnK5000438 for openvpn-devel@lists.sourceforge.net; Sat, 12 Sep 2026 12:23:49 +0200 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Sat, 12 Sep 2026 12:23:42 +0200 Message-ID: <20260912102348.423-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.53.0 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "sfi-spamd-1.hosts.colo.sdot.me", 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: From: Frank Lichtenheld Trying to get to a state where it actually passes when merged. Change-Id: I65f8826f343822c75e789d91881c9dbac676880f Signed-off-by: Frank Lichtenheld Acked-by: Razvan Cojocaru Gerrit URL: https://gerrit.openvpn.net/c/o [...] Content analysis details: (1.3 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-Headers-End: 1x5Kto-0005Vz-0g Subject: [Openvpn-devel] [PATCH v1] cppcheck: Update suppressions for current master 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: 1876121245069546037 X-GMAIL-MSGID: 1876121245069546037 From: Frank Lichtenheld Trying to get to a state where it actually passes when merged. Change-Id: I65f8826f343822c75e789d91881c9dbac676880f Signed-off-by: Frank Lichtenheld Acked-by: Razvan Cojocaru Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1911 --- This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master. Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1911 This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above): Razvan Cojocaru diff --git a/dev-tools/cppcheck-suppression b/dev-tools/cppcheck-suppression index f4f88a3..e1ffe37 100644 --- a/dev-tools/cppcheck-suppression +++ b/dev-tools/cppcheck-suppression @@ -26,17 +26,14 @@ getpwnamCalled getservbynameCalled localtimeCalled -strtokCalled # FP: posix.cfg claims suseconds_t is unsigned for some reason unsignedLessThanZero:src/openvpn/otime.h:148 # IGN: multi code does weird things with pointers to local variables... -autoVariables:src/openvpn/multi.c:4232 +autoVariables:src/openvpn/multi.c:4242 autoVariables:src/openvpn/multi_io.c:324 # IGN: the code header = 0 | (OPCODE << P_OPCODE_SHIFT) is used intentionally badBitmaskCheck:src/openvpn/mudp.c badBitmaskCheck:tests/unit_tests/openvpn/test_pkt.c -# IGN: we store integers in pointers -CastAddressToIntegerAtReturn:src/openvpn/multi.c # IGN: Windows specific (unsigned long == unsigned int) compareValueOutOfTypeRangeError:src/openvpn/ssl_verify.c:928 # FP: cppcheck seems to have wrong signature of DeviceIoControl() @@ -78,8 +75,6 @@ nullPointerRedundantCheck:src/openvpn/init.c:301 # FP: cppcheck doesn't understand ZeroMemory redundantAssignment:src/openvpnserv/interactive.c:203 -# FP: cppcheck doesn't know the NLA macros -redundantInitialization:src/openvpn/dco_linux.c # IGN: We reuse the same variable name due to macro usage shadowVariable:src/openvpn/options.c:1948 shadowVariable:src/openvpn/options.c:1966 @@ -93,12 +88,10 @@ uninitvar:src/openvpn/options_parse.c:148 # FP: uninit is fine when it is a return parameter ctuuninitvar:src/openvpn/crypto_mbedtls_legacy.c:690 -uninitvar:src/openvpnserv/interactive.c:2775 +uninitvar:src/openvpnserv/interactive.c:2783 uninitvar:src/tapctl/main.c:566 -# FP: we added a check but cppcheck is not convinced -uninitvar:src/openvpnserv/interactive.c:2667 # FP: weird parse error, the macro is fine in the rest of the file -unknownMacro:src/openvpnserv/interactive.c:3596 +unknownMacro:src/openvpnserv/interactive.c:3604 # FP: cppcheck doesn't account for short-circuiting unreadVariable:src/openvpn/manage.c:682 unusedFunction:src/openvpn/siphash_reference.c @@ -112,8 +105,6 @@ unusedFunction:tests/unit_tests/openvpnserv/test_openvpnserv.c # IGN: keep mocking around for future use unusedFunction:tests/unit_tests/openvpn/mock_msg.c -# FP: doesn't account for --wrap -unusedFunction:tests/unit_tests/openvpn/test_tls_crypt.c unusedFunction:/usr/include/* # FP: cppcheck doesn't know the NLA macros unusedLabel:src/openvpn/dco_linux.c diff --git a/dev-tools/run-cppcheck.sh b/dev-tools/run-cppcheck.sh index fc14405..37de267 100755 --- a/dev-tools/run-cppcheck.sh +++ b/dev-tools/run-cppcheck.sh @@ -33,7 +33,7 @@ --suppressions-list=${SCRIPT_DIR}/cppcheck-suppression \ --cppcheck-build-dir=${CPPCHECK_DIR} \ --check-level=${CPPCHECK_CHECK_LEVEL} --max-configs=10 \ - --error-exitcode=1" + --error-exitcode=1 --showtime=summary" set -x @@ -53,5 +53,6 @@ -UTARGET_LINUX -UTARGET_FREEBSD -UTARGET_OPENBSD -UTARGET_NETBSD \ -UTARGET_DARWIN -UTARGET_ANDROID -UTARGET_SOLARIS -UTARGET_DRAGONFLY \ -UTARGET_AIX \ + -UOPENSSL_NO_EC \ src/openvpn* src/compat/ \ tests/unit_tests/example_test/ tests/unit_tests/openvpn* diff --git a/src/openvpn/ssl.c b/src/openvpn/ssl.c index 71459ee..48508e5 100644 --- a/src/openvpn/ssl.c +++ b/src/openvpn/ssl.c @@ -3226,7 +3226,7 @@ return; } - uint8_t *dataptr = to_link->data; + const uint8_t *dataptr = to_link->data; /* we don't expect send_reliable to be NULL when state is * not S_UNDEF, but people have reported crashes nonetheless,