From: "cron2 (Code Review)" Date: Mon, 15 Dec 2025 17:26:02 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="q9mG50WaDDA="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: multi: Warn about failing read in multi_process_file_closed() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: flichtenheld , plaisthos Cc: openvpn-devel --q9mG50WaDDA= 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/+/1443?usp=3Demail ) The following approvals got outdated and were removed: Code-Review+2 by cron2 Change subject: multi: Warn about failing read in multi_process_file_closed= () ...................................................................... multi: Warn about failing read in multi_process_file_closed() Handle failure explicitly instead of the implicit handling by "while (buffer_i < r)". That error checking was previously broken but was fixed by commit 5e5ead5ba019fc2a8266f77a7d840b30fd545198. Reported-by: Marc Heuse Github: openvpn-private-issues#101 Change-Id: Ie982f620a8af80564a70d993e6e84ec4e525236a Signed-off-by: Frank Lichtenheld Acked-by: Gert Doering Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1443 Message-Id: <20251215155652.23362-1-gert@...1296...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg35= 095.html Signed-off-by: Gert Doering --- M src/openvpn/multi.c 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/43/1443/2 diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c index 92eac6f..329d0a3 100644 --- a/src/openvpn/multi.c +++ b/src/openvpn/multi.c @@ -2806,6 +2806,11 @@ char buffer[INOTIFY_EVENT_BUFFER_SIZE]; ssize_t buffer_i =3D 0; ssize_t r =3D read(m->top.c2.inotify_fd, buffer, INOTIFY_EVENT_BUFFER_= SIZE); + if (r < 0) + { + msg(M_WARN | M_ERRNO, "MULTI: multi_process_file_closed error"); + return; + } while (buffer_i < r) { -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1443?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: Ie982f620a8af80564a70d993e6e84ec4e525236a Gerrit-Change-Number: 1443 Gerrit-PatchSet: 2 Gerrit-Owner: flichtenheld Gerrit-Reviewer: cron2 Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel --q9mG50WaDDA= 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

multi: Warn about failing read in m=
ulti_process_file_closed()

Handle failure explicitly instead of the = implicit
handling by "while (buffer_i < r)". That error
= checking was previously broken but was fixed by
commit 5e5ead5ba019fc2a8= 266f77a7d840b30fd545198.

Reported-by: Marc Heuse <marc@...2953...= >
Github: openvpn-private-issues#101
Change-Id: Ie982f620a8af80564= a70d993e6e84ec4e525236a
Signed-off-by: Frank Lichtenheld <frank@...2375...= 41...>
Acked-by: Gert Doering <gert@...1296...>
Gerrit URL: = https://gerrit.openvpn.net/c/openvpn/+/1443
Message-Id: <202512151556= 52.23362-1-gert@...1296...>
URL: https://www.mail-archive.com/openvpn= -devel@lists.sourceforge.net/msg35095.html
Signed-off-by: Gert Doering &= lt;gert@...1296...>
---
M src/openvpn/multi.c
1 file changed, 5= insertions(+), 0 deletions(-)

git pull ssh://ge=
rrit.openvpn.net:29418/openvpn refs/changes/43/1443/2
diff --git a/=
src/openvpn/multi.c b/src/openvpn/multi.c
index 92eac6f..32= 9d0a3 100644
--- a/src/openvpn/multi.c
+++ = b/src/openvpn/multi.c
@@ -2806,6 +2806,11 @@
char buffer[INOTIFY_EVENT_BUFFER_SIZE];
ssize_t= buffer_i =3D 0;
ssize_t r =3D read(m->top.c2.inoti= fy_fd, buffer, INOTIFY_EVENT_BUFFER_SIZE);
+ if (r < 0)
+ {
+ msg(M_WARN | M_ERRNO, "MULTI: multi_process_file_closed= error");
+ = return;
+ }

while (buffer_i < r)
{


To view, visit change 1443. To unsu= bscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ie982f620a8af80564a70d993e6e= 84ec4e525236a
Gerrit-Change-Number: 1443
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>
= --q9mG50WaDDA=--