From: "stipa (Code Review)" Date: Tue, 16 Sep 2025 07:10:24 +0000 In-Reply-To: References: Reply-To: lstipakov@...277..., arne-openvpn@...1227..., selva.nair@...277..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: <5d005d88119c7783b5c212976089f6a4fd3ea0ec-EmailReviewComments-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="jxuU+IDA++k="; charset=UTF-8 Subject: [Openvpn-devel] [M] Change in openvpn[master]: openvpnserv: Fix writing messages to the event log List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: selvanair , plaisthos , flichtenheld , openvpn-devel --jxuU+IDA++k= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: flichtenheld, plaisthos, selvanair. stipa has posted comments on this change. ( http://gerrit.openvpn.net/c/ope= nvpn/+/1188?usp=3Demail ) Change subject: openvpnserv: Fix writing messages to the event log ...................................................................... Patch Set 2: (2 comments) File src/openvpnserv/common.c: http://gerrit.openvpn.net/c/openvpn/+/1188/comment/faf6c002_b6bdf61f : PS1, Line 209: NULL, error, MAKELANGID(LANG_NEUTRAL= , SUBLANG_DEFAULT), (LPTSTR)&tmp, 0, NULL); > Explict use of the unicode version "FormatMessageW" preferred. Acknowledged http://gerrit.openvpn.net/c/openvpn/+/1188/comment/33eaf24d_50732a8f : PS1, Line 228: buf[_countof(buf) - 1] =3D L'\0'; > Previously we removed openvp_swprintf etc. [=E2=80=A6] JFTR: only MSFT version of swprintf guarantees NULL termination. Other vers= ions won't write anything (and won't terminate) if the string doesn't fit. = OTOH, we build releases with MSVC and in any case we nowadays use MSFT impl= ementation (ucrtbase.dll) from OS. -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1188?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I423c9880def0eb479abb72bef2e8034a73cf5905 Gerrit-Change-Number: 1188 Gerrit-PatchSet: 2 Gerrit-Owner: stipa Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-CC: selvanair Gerrit-Attention: plaisthos Gerrit-Attention: flichtenheld Gerrit-Attention: selvanair Gerrit-Comment-Date: Tue, 16 Sep 2025 07:10:24 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: selvanair Gerrit-MessageType: comment --jxuU+IDA++k= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is currently required from: flichtenheld, plaisthos, selvanai= r.

View = Change

2 comments:

  • File src/openvpnserv/common.c:

    =
    • Patch Set #1, Line 20= 9: = NULL, error, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR)&tm= p, 0, NULL);

      Explict use of the unicode version "= ;FormatMessageW" preferred.

      Acknowledged

    • Patch Set #= 1, Line 228: buf[_c= ountof(buf) - 1] =3D L'\0';

      Previously we rem= oved openvp_swprintf etc. [=E2=80=A6]

      JFTR: only MSFT version of swprintf g= uarantees NULL termination. Other versions won't write anything (and wo= n't terminate) if the string doesn't fit. OTOH, we build releases w= ith MSVC and in any case we nowadays use MSFT implementation (ucrtbase.dll)= from OS.

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

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I423c9880def0eb479abb72bef2e= 8034a73cf5905
Gerrit-Change-Number: 1188
Gerrit-PatchSet: 2
Gerrit-Owner: stipa <lstipakov@...277...>= ;
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-CC: selvanair <selva.nair@...277...&= gt;
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
Gerrit-Attention: flichtenheld <frank@...2375...= 41...>
Gerrit-Attention: selvanair <selva.nair@...493...= 277...>
Gerrit-Comment-Date: Tue, 16 Sep 2025 07:10:24= +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: selvanair <selva.nair@= ...277...>
Gerrit-MessageType: comment
--jxuU+IDA++k=--