From: "cron2 (Code Review)" Date: Mon, 6 Apr 2026 10:01:24 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: <1578c0891c3f49e3c5b4b8ba20bd0cd0b90048d9-EmailReplacePatchSet-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="yRz3T1NEg3g="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: test_packet_id: Add a check after malloc to ensure value is valid List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: flichtenheld , plaisthos Cc: openvpn-devel --yRz3T1NEg3g= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has uploaded a new patch set (#2) to the change originally created by= flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1621?usp=3Demail ) The following approvals got outdated and were removed: Code-Review+2 by cron2 Change subject: test_packet_id: Add a check after malloc to ensure value is= valid ...................................................................... test_packet_id: Add a check after malloc to ensure value is valid 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 Message-Id: <20260406074729.29903-1-gert@...1296...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg36= 516.html Signed-off-by: Gert Doering --- M tests/unit_tests/openvpn/test_packet_id.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/21/1621/2 diff --git a/tests/unit_tests/openvpn/test_packet_id.c b/tests/unit_tests/o= penvpn/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 =3D malloc(sizeof(struct reliable)); + assert_non_null(rel); reliable_init(rel, 100, 50, 8, false); rel->array[5].active =3D true; -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1621?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings?usp=3Demail Gerrit-MessageType: newpatchset Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I64da2328591ef2b9ee7502e574c878651cdf356a Gerrit-Change-Number: 1621 Gerrit-PatchSet: 2 Gerrit-Owner: flichtenheld Gerrit-Reviewer: cron2 Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel --yRz3T1NEg3g= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 upl= oaded patch set #2 to the change originally created by flichtenhel= d.

View Change

The following approvals got outdated and were remove= d: Code-Review+2 by cron2

test_packet_id: Add a check after m=
alloc to ensure value is valid

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: I6= 4da2328591ef2b9ee7502e574c878651cdf356a
Signed-off-by: Frank Lichtenheld= <frank@...2641...>
Acked-by: Gert Doering <gert@...1296...>=
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1621
Message-Id: = <20260406074729.29903-1-gert@...1296...>
URL: https://www.mail-arc= hive.com/openvpn-devel@lists.sourceforge.net/msg36516.html
Signed-off-by= : Gert Doering <gert@...1296...>
---
M tests/unit_tests/openvpn= /test_packet_id.c
1 file changed, 1 insertion(+), 0 deletions(-)

=
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/ch=
anges/21/1621/2
diff --git a/tests/unit_tests/openvpn/test_packet_i=
d.c b/tests/unit_tests/openvpn/test_packet_id.c
index b7538= bd..5dfd319 100644
--- a/tests/unit_tests/openvpn/test_pack= et_id.c
+++ b/tests/unit_tests/openvpn/test_packet_id.c
@@ -164,6 +164,7 @@
test_get_num_output_seque= nced_available(void **state)
{
struct= reliable *rel =3D malloc(sizeof(struct reliable));
+ assert_non_null(rel);
reliable_init(rel, 100, 50, 8, false);


rel->array[5].active =3D true;

To view, visit change 1621. To unsubscribe, or for help writing mail filter= s, visit setting= s.

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I64da2328591ef2b9ee7502e574c= 878651cdf356a
Gerrit-Change-Number: 1621
Gerrit-PatchSet: 2
Gerrit-Owner: flichtenheld <frank@...2723...= .>
Gerrit-Reviewer: cron2 <gert@...1296...>=
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
= --yRz3T1NEg3g=--