From patchwork Wed May 13 09:17:05 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 4932 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:a719:b0:84a:48f:a1fd with SMTP id hl25csp3027665mab; Wed, 13 May 2026 02:17:57 -0700 (PDT) X-Forwarded-Encrypted: i=2; AFNElJ/yFrd7tkE+IfQq3rBJ/7nMZCr8qNbjO/Kz1MI+v9REd9WKQg1JWcS39OWfbTgU/Fjy1pncl87jXAw=@openvpn.net X-Received: by 2002:a05:6808:6706:b0:467:16e4:d276 with SMTP id 5614622812f47-482b2a59c56mr1712430b6e.3.1778663877305; Wed, 13 May 2026 02:17:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1778663877; cv=none; d=google.com; s=arc-20240605; b=BSGQ8twx/hxQCCxB+M8ZQtDnmMaJF+Bda/X6EFXuTyjMSlmSn8JOcYv/bnGFoXDgDl OrfQQfDOLWRJYidYL00tBiWrccYiNLwTVGpFYTdhY2vaQ0WNJtbohw3/NPDYXWcOqsNX HO/yd8ztgTSNw0B12l/E/PgOTQ3uX2OvSK1V39XJJilS6nZy/i4w9B1I87EHDh3Lx5Y5 55HleVI0YbVU+HcXoxDLQL6fG8f2kPdjhoDkBqdWyRMed2nG07SsAVHzYvCn+lm0FbpD uYo7QGe+ZsQFlK1HAW+s69xM9Vsrl2NT8zsM4myZOCUHa33YPPPMdaiyjXFiXt0y2Zpq AQWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=FCQeDX5vL9BGoABn5hLbELkadRM6PZIE0fsYc5kBI8I=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=f3PI/TbSlKHlL4P7A5C1gkCgrRZjLCb97ss8oB4UoHg+v6SZnorsYZxDwMu8FQxyno rqh72DVrheUvaDnEHLdvoAw97/kRwJi96MJ2uCP3m5y7rAzPxv7KaGgpiV1IHJxyAp1E akAw/PDJDEczdCg9W1XeWSHvPHTzAuf2lZFvQDXdvXuyOd2EeenQaiZo9A/MWCtdCowA tTZAElrDeTG1S2GAiuudbbo08TQDe+dEWkI/GinTZMUZCQ0CjsW4CEjHQOnthsBRs1Eb JdRs2cWei1qPOif8UxkPAEGBQzzKM5YG2MUvEfOfz1HSe/fH757bJV0MEf/A814U5iot urZA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=aYXwlivK; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=k+sraCg4; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=ElFKwEnO; 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-47c764a0d01si21717420b6e.42.2026.05.13.02.17.57 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 May 2026 02:17:57 -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=aYXwlivK; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=k+sraCg4; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=ElFKwEnO; 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=FCQeDX5vL9BGoABn5hLbELkadRM6PZIE0fsYc5kBI8I=; b=aYXwlivKbsWUvN7CuaQdhzBF8k USrSjIL1OnWK0PbOQQyULtHDcPbG6YHSyNJXhH+dDV9pJr9lqcx0bppp2iXbaPCWioECN1Y6nj4Ek xZ6x9akmH78PbTCQzB8r7iJs9dnTtTQItShVPkYaYd5dlNXZ0PJksChRTNE4ULjL/c7w=; Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1wN5j2-0008On-RS; Wed, 13 May 2026 09:17:54 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1wN5ik-0008Nf-Gs for openvpn-devel@lists.sourceforge.net; Wed, 13 May 2026 09:17:36 +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=5QXAoMN9kay65Xy2Aqc6cg3NAEQZOE8g4+eRzjClxRQ=; b=k+sraCg44ymQg4vwKDOuq/k56B nJmEoVRbYKTXAlK88wWxTwthpNzDsEqRhsCSlKMOAkf2sKBE5C9+j3nHn2nnoBERbKKIsfpc0MS38 T3tQwz9tz+LxzrieEyRTrYXzttHxBU7r6eb/F7X2sSfSVM12JR+GC8/X11UPy83xJQE4=; 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=5QXAoMN9kay65Xy2Aqc6cg3NAEQZOE8g4+eRzjClxRQ=; b=ElFKwEnOcmFrXPlAw7+2cYSFSs KHFvY3b6vow8FGEn2a7VT6T2ZK38qaHc/dIa8MEOOvATqMUKuDU6U91UgkjN/zV4jzGX4MeCpOwXl y3tgJrpHcJugy3pYQn/vPdeoctEifU7EIaVfuJcnKTpbgEbfVo6Br/IWxaV6kubPGlrM=; 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 1wN5iU-0003oB-7l for openvpn-devel@lists.sourceforge.net; Wed, 13 May 2026 09:17:24 +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 64D9HARh028398 for ; Wed, 13 May 2026 11:17:10 +0200 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.1/8.18.1/Submit) id 64D9HA57028397 for openvpn-devel@lists.sourceforge.net; Wed, 13 May 2026 11:17:10 +0200 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Wed, 13 May 2026 11:17:05 +0200 Message-ID: <20260513091710.28378-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.52.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-2.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 If mi is NULL, the previous code lines already segfaulted. Identified by cppcheck. 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: 1wN5iU-0003oB-7l Subject: [Openvpn-devel] [PATCH v3] multi: Remove useless checks 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?1865064254060823629?= X-GMAIL-MSGID: =?utf-8?q?1865064254060823629?= From: Frank Lichtenheld If mi is NULL, the previous code lines already segfaulted. Identified by cppcheck. Change-Id: If58bb807842b7b95aeffe6849e7a7344e4925762 Signed-off-by: Frank Lichtenheld Acked-by: Gert Doering Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1667 --- 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/+/1667 This mail reflects revision 3 of this Change. Acked-by according to Gerrit (reflected above): Gert Doering diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c index 06e3758..a957fdf 100644 --- a/src/openvpn/multi.c +++ b/src/openvpn/multi.c @@ -3054,8 +3054,8 @@ #ifdef MULTI_DEBUG_EVENT_LOOP printf("POST %s[%d] to=%d lo=%d/%d w=%" PRIi64 "/%ld\n", id(mi), (int)(mi == m->pending), - mi ? mi->context.c2.to_tun.len : -1, mi ? mi->context.c2.to_link.len : -1, - (mi && mi->context.c2.fragment) ? mi->context.c2.fragment->outgoing.len : -1, + mi->context.c2.to_tun.len, mi->context.c2.to_link.len, + mi->context.c2.fragment ? mi->context.c2.fragment->outgoing.len : -1, (int64_t)mi->context.c2.timeval.tv_sec, (long)mi->context.c2.timeval.tv_usec); #endif }