From patchwork Mon Apr 6 07:47:24 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 4877 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:d1c6:b0:83c:d90d:321 with SMTP id ly6csp1265736mab; Mon, 6 Apr 2026 00:47:49 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUIzF7nRBMXJgZ33WAMbsgN3YPOphF09Da6Uf4zkwKo8FI0zqBT3B6XS93dnNWc/CD5WC0kc89drfU=@openvpn.net X-Received: by 2002:a05:6870:238c:b0:422:f2ba:adda with SMTP id 586e51a60fabf-4230ffc0e95mr6761754fac.27.1775461668801; Mon, 06 Apr 2026 00:47:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1775461668; cv=none; d=google.com; s=arc-20240605; b=K5keT+YFsPrfpzmupUuZbx+vCyJoTvqLoNVUHp/lOSX7KG3oxP/n4/QC1DxN8VBbaf 9zFGtaSekJvCH9hDHRqOPlX63z0OY0OCyo1kONBOZYBAfu9Xww45Ztt2dLmLnoyMI9T5 9onsd1E0LRC8fMlRbzhMa1GCcWdJIMOkX+idaTTasViq/9rvM4g5sjEsddOxF7htGsXt nR1ZkqaYv4uiQcBEF9F+VxbVaLDvbYdlJoiNlziOeK1qit7HUFF9oSYMHVfegSiR+hgo 6H7BBhrHJ6xvwwnE9zxCeje/1p4aBdc2lDkBCuZGybt9QWK06CWrEGEZh9VLJ2RXnaAX Sq3A== 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=3L1JXEZWdwdL1uGOpJgE24bwPdd02Ke5KdjwdSCpzMM=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=crlgP1Qqs80HCicBVFjRrhqXC5NEVS6o8DSxvvgxpJBz23IQfE94/E1jz0FfvMGhOI n3S2pnpixRwhvHfz+3usOOxXqiSGM84DlzYgyHLStf55i3ruA4KdAFN4ty6hb06fpFLE 4zTfi+uqogReLSE6HCjNe0A4ZrW5+O0n7CPMo/rhRryAw3XlA7IMR6eQQtyTTrO//IkC D3DBLfEqLh2GkTN2u7uO6zX+NF+HywK8j4WiKG9EhlQRfeClmxc4268q7/ducdFup36S alZw/mHCr0hlWCZ5RVNKMYJ6Z182Pjq5VVnfdvooiWxUwQkmKgobpJnoPHwWXPL56tOs h9FA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=YtXDGAm+; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b="kU7Jf/Xc"; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=NcAeIYUW; 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 586e51a60fabf-4233f298644si5444780fac.310.2026.04.06.00.47.45 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Apr 2026 00:47:48 -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=YtXDGAm+; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b="kU7Jf/Xc"; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=NcAeIYUW; 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=3L1JXEZWdwdL1uGOpJgE24bwPdd02Ke5KdjwdSCpzMM=; b=YtXDGAm+fjLFfy8l1EIA43pVzc UQaaxgXd+Z3j6X33w6NqrCs7cLyF8lq1O3eMYCLB2B+bzFq2eMDIkd4DOdhPPAUhGVtsJ0JYFVb4Y a1uh+pFL5p0xY1NPOQ1bZqACFODYks/ncdvWX5QcMaJ0vxmyXny3TgtTE5z7TeTfU4bE=; 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 1w9egQ-0002Sk-Sj; Mon, 06 Apr 2026 07:47:43 +0000 Received: from [172.30.29.66] (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 1w9egQ-0002Se-3e for openvpn-devel@lists.sourceforge.net; Mon, 06 Apr 2026 07:47:42 +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=W1ZTpYNpmNjL0T1ZMCJQzAlpdFEOHO9mShcSo+MNfY4=; b=kU7Jf/Xcs/8ncPQn1QmlBOFp/D xXmUObhA/ERVUE90LskzJ0cmJ2UUaOb8sPMr18Rg1wA1xxOhQNa6xP/EdAzdSWhmoz9FrjrXgbCJx G5xhB9pZcLJIXpOp4Cqjy9gAh8n+RmypTW+9kL1HlXrF+su38BHFpiisPcFRKlbRG4gk=; 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=W1ZTpYNpmNjL0T1ZMCJQzAlpdFEOHO9mShcSo+MNfY4=; b=NcAeIYUW3EdHB1VYRbhNmqNl4O zmzS6Cb/MJJGkCUZbDKTY12MTbUZkz/DS5pmlLFegXRMT9OLWOqflG57D0sTnG84HSKC4LtDNuJuc M4r+TnG/xMQB2wMJwy62X2Sh8dF9RG3psv7175QsOzP2Zl1c5Or/HWquXQyxPN5HopVU=; 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 1w9egP-0007Va-RC for openvpn-devel@lists.sourceforge.net; Mon, 06 Apr 2026 07:47:42 +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 6367lUI4029915 for ; Mon, 6 Apr 2026 09:47:30 +0200 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.1/8.18.1/Submit) id 6367lUsR029914 for openvpn-devel@lists.sourceforge.net; Mon, 6 Apr 2026 09:47:30 +0200 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Mon, 6 Apr 2026 09:47:24 +0200 Message-ID: <20260406074729.29903-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-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 cppcheck complains about a potential null pointer dereference in reliable_get_num_output_sequenced_available. That is mostly theoretical, but still add a check. 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: 1w9egP-0007Va-RC Subject: [Openvpn-devel] [PATCH v1] test_packet_id: Add a check after malloc to ensure value is valid 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?1861706494542292928?= X-GMAIL-MSGID: =?utf-8?q?1861706494542292928?= From: Frank Lichtenheld cppcheck complains about a potential null pointer dereference in reliable_get_num_output_sequenced_available. That is mostly theoretical, but still add a check. Change-Id: I64da2328591ef2b9ee7502e574c878651cdf356a Signed-off-by: Frank Lichtenheld Acked-by: Gert Doering Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1621 --- 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/+/1621 This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above): Gert Doering diff --git a/tests/unit_tests/openvpn/test_packet_id.c b/tests/unit_tests/openvpn/test_packet_id.c index b7538bd..5dfd319 100644 --- a/tests/unit_tests/openvpn/test_packet_id.c +++ b/tests/unit_tests/openvpn/test_packet_id.c @@ -164,6 +164,7 @@ test_get_num_output_sequenced_available(void **state) { struct reliable *rel = malloc(sizeof(struct reliable)); + assert_non_null(rel); reliable_init(rel, 100, 50, 8, false); rel->array[5].active = true;