From: "cron2 (Code Review)" Date: Sun, 23 Nov 2025 13:22:20 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., heiko@...515..., openvpn-devel@lists.sourceforge.net Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="28GzpDVbRKI="; 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: d12fk Cc: plaisthos , openvpn-devel --28GzpDVbRKI= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/13= 89?usp=3Demail ) 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 Acked-by: Gert Doering Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1389 Message-Id: <20251123113747.17739-1-gert@...1296...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg34= 606.html Signed-off-by: Gert Doering --- M src/openvpnserv/interactive.c 1 file changed, 1 insertion(+), 1 deletion(-) 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: merged Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I8b26c65415f5a751f416d80a22cbb7ff14aa27c0 Gerrit-Change-Number: 1389 Gerrit-PatchSet: 2 Gerrit-Owner: d12fk Gerrit-Reviewer: cron2 Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel --28GzpDVbRKI= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 sub= mitted this change.

View Change

iservice: make sure buffer size is not zero
<= br>GetItfDnsDomains expects a non-zero size buffer to return the domainsin. Check for the size as well, not just for a valid pointer.

Chang= e-Id: I8b26c65415f5a751f416d80a22cbb7ff14aa27c0
Reported-by: Marc Heuse = <marc@...2953...>
Reported-by: stephan@...2953...
Signed-off-by= : Heiko Hund <heiko@...2662...>
Acked-by: Gert Doering <gert@...1186...= .1296...>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1389
= Message-Id: <20251123113747.17739-1-gert@...1296...>
URL: https://= www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg34606.html
S= igned-off-by: Gert Doering <gert@...1296...>
---
M src/openvpns= erv/interactive.c
1 file changed, 1 insertion(+), 1 deletion(-)

<= /pre>
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 doma= ins, PDWORD size)
{
- if (domains =3D=3D NULL || size =3D=3D 0)
+ if (domains =3D=3D NULL || siz= e =3D=3D NULL || *size =3D=3D 0)

{
= return ERROR_INVALID_PARAMETER;
}

To view, visit change 1389. To unsubscribe, or for help w= riting mail filters, visit settings.

Gerrit-MessageType: merged
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I8b26c65415f5a751f416d80a22c= bb7ff14aa27c0
Gerrit-Change-Number: 1389
Gerrit-PatchSet: 2
Gerrit-Owner: d12fk <heiko@...515...>
Gerrit-Reviewer: cron2 <gert@...1296...>=
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
= --28GzpDVbRKI=--