From: "d12fk (Code Review)" Date: Sun, 23 Nov 2025 06:47:16 +0000 References: Reply-To: heiko@...515..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net Message-ID: <19d676cf5e7b65989dd91d132b6578441c9b9f58-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="LGpocgcZ7vA="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: iservice: make sure buffer size is not zero List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos Cc: openvpn-devel --LGpocgcZ7vA= 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/+/1389?usp=3Demail to review the following change. Change subject: iservice: make sure buffer size is not zero ...................................................................... iservice: make sure buffer size is not zero GetItfDnsDomains expects a non-zero size buffer to return the domains in. Check for the size as well, not just for a valid pointer. Change-Id: I8b26c65415f5a751f416d80a22cbb7ff14aa27c0 Reported-by: Marc Heuse Reported-by: stephan@...2953... Signed-off-by: Heiko Hund --- M src/openvpnserv/interactive.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/89/1389/1 diff --git a/src/openvpnserv/interactive.c b/src/openvpnserv/interactive.c index f64c247..d778e89 100644 --- a/src/openvpnserv/interactive.c +++ b/src/openvpnserv/interactive.c @@ -2149,7 +2149,7 @@ static LSTATUS GetItfDnsDomains(HKEY itf, PCWSTR search_domains, PWSTR domains, PDWORD si= ze) { - if (domains =3D=3D NULL || size =3D=3D 0) + if (domains =3D=3D NULL || size =3D=3D NULL || *size =3D=3D 0) { return ERROR_INVALID_PARAMETER; } -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1389?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: I8b26c65415f5a751f416d80a22cbb7ff14aa27c0 Gerrit-Change-Number: 1389 Gerrit-PatchSet: 1 Gerrit-Owner: d12fk Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos --LGpocgcZ7vA= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is cur= rently required from: plaisthos.

d12fk would like plaisthos to review this change.

V= iew Change

iservice: make sure buffer size is not zero=


GetItfDnsDomains expects a non-zero size buffer to return the domai= ns
in. Check for the size as well, not just for a valid pointer.

= Change-Id: I8b26c65415f5a751f416d80a22cbb7ff14aa27c0
Reported-by: Marc H= euse <marc@...2953...>
Reported-by: stephan@...2953...
Signed-o= ff-by: Heiko Hund <heiko@...2662...>
---
M src/openvpnserv/inte= ractive.c
1 file changed, 1 insertion(+), 1 deletion(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/89/= 1389/1
diff --git a/src/openvpnserv/interactive.c b/src/openvpnserv=
/interactive.c
index f64c247..d778e89 100644
--- a/src/openvpnserv/interactive.c
+++ b/src/openvpnserv= /interactive.c
@@ -2149,7 +2149,7 @@
stati= c LSTATUS
GetItfDnsDomains(HKEY itf, PCWSTR search_domains= , PWSTR domains, PDWORD size)
{
- if (domains =3D=3D NULL || size =3D=3D 0)
+ if (domains =3D=3D= NULL || size =3D=3D NULL || *size =3D=3D 0)
{<= br> return ERROR_INVALID_PARAMETER;
}

To view, visit change 1389. To unsubscribe, o= r for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I8b26c65415f5a751f416d80a22c= bb7ff14aa27c0
Gerrit-Change-Number: 1389
Gerrit-PatchSet: 1
Gerrit-Owner: d12fk <heiko@...515...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
= --LGpocgcZ7vA=--