From: "flichtenheld (Code Review)" Date: Fri, 8 May 2026 11:27:31 +0000 References: Reply-To: frank@...2641..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="ntu5T0pIrcE="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: pool: Fix a potential NULL pointer de-reference in test code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos Cc: openvpn-devel --ntu5T0pIrcE= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: plaisthos. Hello plaisthos, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/1676?usp=3Demail to review the following change. Change subject: pool: Fix a potential NULL pointer de-reference in test code ...................................................................... pool: Fix a potential NULL pointer de-reference in test code Identified by cppcheck. Probably has been a long time since that code has been compiled, though. Change-Id: I09ebbf6f3555dd68ce8d75bfa844ecac518a0cf2 Signed-off-by: Frank Lichtenheld --- M src/openvpn/pool.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/76/1676/1 diff --git a/src/openvpn/pool.c b/src/openvpn/pool.c index 15004c0..ff74e7c 100644 --- a/src/openvpn/pool.c +++ b/src/openvpn/pool.c @@ -757,7 +757,7 @@ break; } msg(M_INFO | M_NOPREFIX, "IFCONFIG_POOL TEST pass 1: l=3D%s r=3D%s= cn=3D%s", - print_in_addr_t(local, 0, &gc), print_in_addr_t(remote, 0, &gc= ), cn); + print_in_addr_t(local, 0, &gc), print_in_addr_t(remote, 0, &gc= ), cn ? cn : "[NULL]"); array[i] =3D h; } @@ -793,7 +793,7 @@ break; } msg(M_INFO | M_NOPREFIX, "IFCONFIG_POOL TEST pass 3: l=3D%s r=3D%s= cn=3D%s", - print_in_addr_t(local, 0, &gc), print_in_addr_t(remote, 0, &gc= ), cn); + print_in_addr_t(local, 0, &gc), print_in_addr_t(remote, 0, &gc= ), cn ? cn : "[NULL]"); array[i] =3D h; } -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1676?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings?usp=3Demail Gerrit-MessageType: newchange Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I09ebbf6f3555dd68ce8d75bfa844ecac518a0cf2 Gerrit-Change-Number: 1676 Gerrit-PatchSet: 1 Gerrit-Owner: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos --ntu5T0pIrcE= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is cur= rently required from: plaisthos.

flichtenheld would like plaisthos to review this change.

V= iew Change

pool: Fix a potential NULL pointer de-refer=
ence in test code

Identified by cppcheck. Probably has been a long t= ime
since that code has been compiled, though.

Change-Id: I09ebbf= 6f3555dd68ce8d75bfa844ecac518a0cf2
Signed-off-by: Frank Lichtenheld <= frank@...2641...>
---
M src/openvpn/pool.c
1 file changed, 2 in= sertions(+), 2 deletions(-)

git pull ssh://gerri=
t.openvpn.net:29418/openvpn refs/changes/76/1676/1
diff --git a/src=
/openvpn/pool.c b/src/openvpn/pool.c
index 15004c0..ff74e7c= 100644
--- a/src/openvpn/pool.c
+++ b/src/= openvpn/pool.c
@@ -757,7 +757,7 @@
= break;
}
msg(M_INFO = | M_NOPREFIX, "IFCONFIG_POOL TEST pass 1: l=3D%s r=3D%s cn=3D%s",=
- print_in_= addr_t(local, 0, &gc), print_in_addr_t(remote, 0, &gc), cn);=
+ print_in_addr_= t(local, 0, &gc), print_in_addr_t(remote, 0, &gc), cn ? cn : "= [NULL]");
array[i] =3D h;
= }

@@ -793,7 +793,7 @@
= break;
}
msg(= M_INFO | M_NOPREFIX, "IFCONFIG_POOL TEST pass 3: l=3D%s r=3D%s cn=3D%s= ",
- pr= int_in_addr_t(local, 0, &gc), print_in_addr_t(remote, 0, &gc), cn);=
+ print_i= n_addr_t(local, 0, &gc), print_in_addr_t(remote, 0, &gc), cn ? cn := "[NULL]");
array[i] =3D h;
}


To view, v= isit cha= nge 1676. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I09ebbf6f3555dd68ce8d75bfa84= 4ecac518a0cf2
Gerrit-Change-Number: 1676
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <frank@...2723...= .>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
= --ntu5T0pIrcE=--