From: "cron2 (Code Review)" Date: Wed, 26 Nov 2025 11:06:04 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., heiko@...515..., openvpn-devel@lists.sourceforge.net Message-ID: <589050f7ffecb9c5c0c0a2bae7e87d65792b0c85-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="IMl/264dVuQ="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: iservice: return correct size when domains are truncated List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: d12fk Cc: plaisthos , openvpn-devel --IMl/264dVuQ= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/13= 91?usp=3Demail ) Change subject: iservice: return correct size when domains are truncated ...................................................................... iservice: return correct size when domains are truncated In case not all domains can be converted in the available buffer, return the size of the already converted domains size plus the second terminating zero for the MULTI_SZ. Reported-by: Marc Heuse Reported-by: stephan@...2953... Change-Id: Iabad046c930dd0f38ec50d1c43d8b3288816df7d Signed-off-by: Heiko Hund Acked-by: Gert Doering Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1391 Message-Id: <20251126104315.4776-1-gert@...1296...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg34= 680.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 ed3c928..4a3e689 100644 --- a/src/openvpnserv/interactive.c +++ b/src/openvpnserv/interactive.c @@ -2214,7 +2214,7 @@ { /* Domain doesn't fit, bad luck if it's the first one = */ *pos =3D '\0'; - *size =3D converted_size =3D=3D 0 ? 0 : *size + 1; + *size =3D converted_size =3D=3D 0 ? 0 : converted_size= + one_glyph; return ERROR_MORE_DATA; } -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1391?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: Iabad046c930dd0f38ec50d1c43d8b3288816df7d Gerrit-Change-Number: 1391 Gerrit-PatchSet: 4 Gerrit-Owner: d12fk Gerrit-Reviewer: cron2 Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel --IMl/264dVuQ= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 sub= mitted this change.

View Change

iservice: return correct size when domains are t=
runcated

In case not all domains can be converted in the available b= uffer, return
the size of the already converted domains size plus the se= cond terminating
zero for the MULTI_SZ.

Reported-by: Marc Heuse &= lt;marc@...2953...>
Reported-by: stephan@...2953...
Change-Id: Iab= ad046c930dd0f38ec50d1c43d8b3288816df7d
Signed-off-by: Heiko Hund <hei= ko@...2662...>
Acked-by: Gert Doering <gert@...1296...>
Gerr= it URL: https://gerrit.openvpn.net/c/openvpn/+/1391
Message-Id: <2025= 1126104315.4776-1-gert@...1296...>
URL: https://www.mail-archive.com/= openvpn-devel@lists.sourceforge.net/msg34680.html
Signed-off-by: Gert Do= ering <gert@...1296...>
---
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 ed3c928..4a3e689 100644
--- a/src/= openvpnserv/interactive.c
+++ b/src/openvpnserv/interactive= .c
@@ -2214,7 +2214,7 @@
{=
/* Domain doesn't fit, bad luck i= f it's the first one */
*pos =3D &= #39;\0';
- = *size =3D converted_size =3D=3D 0 ? 0 : *size + 1;
+ *size =3D con= verted_size =3D=3D 0 ? 0 : converted_size + one_glyph;
= return ERROR_MORE_DATA;
}=


To view, visit change 1391. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: merged
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Iabad046c930dd0f38ec50d1c43d= 8b3288816df7d
Gerrit-Change-Number: 1391
Gerrit-PatchSet: 4
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>
= --IMl/264dVuQ=--