From: "stipa (Code Review)" Date: Thu, 27 Mar 2025 10:05:22 +0000 In-Reply-To: References: Reply-To: lstipakov@...277..., arne-openvpn@...1227..., heiko@...515..., 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="GPTz2WTnsWY="; charset=UTF-8 Subject: [Openvpn-devel] [XL] Change in openvpn[master]: win: implement --dns option support with NRPT List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: d12fk Cc: flichtenheld , plaisthos , openvpn-devel --GPTz2WTnsWY= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: d12fk, plaisthos. stipa has posted comments on this change. ( http://gerrit.openvpn.net/c/ope= nvpn/+/837?usp=3Demail ) Change subject: win: implement --dns option support with NRPT ...................................................................... Patch Set 15: Code-Review-2 (1 comment) File src/openvpnserv/interactive.c: http://gerrit.openvpn.net/c/openvpn/+/837/comment/280dd3ed_8e292101 : PS15, Line 2187: err =3D RegGetValueW(itf, NULL, values[i], RRF_RT_= REG_SZ, NULL, (PBYTE)domains, size); For existing but empty values, the size will be set to 2. As a result, on t= he next iteration we got ERROR_MORE_DATA if there is a non-empty value. How about: ``` DWORD cbData =3D *size; err =3D RegGetValueW(itf, NULL, values[i], RRF_RT_REG_SZ, NULL, (PBYTE)doma= ins, &cbData); if (!err && cbData > one_glyph && wcschr(domains, '.')) { *size =3D cbData; ``` -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/837?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: I576e74f3276362606e9cbd50bb5adbebaaf209cc Gerrit-Change-Number: 837 Gerrit-PatchSet: 15 Gerrit-Owner: d12fk Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-Reviewer: stipa Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-Attention: d12fk Gerrit-Comment-Date: Thu, 27 Mar 2025 10:05:22 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment --GPTz2WTnsWY= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is currently required from: d12fk, plaisthos.

Patch set 15:Code-Review -2

V= iew Change

1 comment:

  • File src/openvpnserv/interactiv= e.c:

    • Patch Set #15,= Line 2187: err= =3D RegGetValueW(itf, NULL, values[i], RRF_RT_REG_SZ, NULL, (PBYTE)domains= , size);

      For existing but empty values, the size will be set to 2. As a result, o= n the next iteration we got ERROR_MORE_DATA if there is a non-empty value.<= /p>

      How about:

      ``=
      `
      DWORD cbData =3D *size;
      err =3D RegGetValueW(itf, NULL, values[i], = RRF_RT_REG_SZ, NULL, (PBYTE)domains, &cbData);
      if (!err && c= bData > one_glyph && wcschr(domains, '.'))
      {
      *= size =3D cbData;
      ```

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

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I576e74f3276362606e9cbd50bb5= adbebaaf209cc
Gerrit-Change-Number: 837
Gerrit-PatchSet: 15
Gerrit-Owner: d12fk <heiko@...515...>
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-Reviewer: stipa <lstipakov@...277...= >
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
Gerrit-Attention: d12fk <heiko@...515...>= ;
Gerrit-Comment-Date: Thu, 27 Mar 2025 10:05:22= +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
--GPTz2WTnsWY=--