From: "cron2 (Code Review)" Date: Thu, 15 May 2025 06:20:42 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, ralf@...2726..., frank@...2641..., antonio@...2726... Message-ID: <683ccc8c4b1b0c60bb174399a35d17778338ca4f-EmailReviewComments-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="z7iSpwyEoww="; charset=UTF-8 Subject: [Openvpn-devel] [M] Change in openvpn[master]: Implement ovpn version detection List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: ralf_lici Cc: plaisthos , flichtenheld , openvpn-devel --z7iSpwyEoww= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: flichtenheld, plaisthos, ralf_lici. cron2 has posted comments on this change. ( http://gerrit.openvpn.net/c/ope= nvpn/+/1022?usp=3Demail ) Change subject: Implement ovpn version detection ...................................................................... Patch Set 1: Code-Review-1 (1 comment) File src/openvpn/dco_linux.c: http://gerrit.openvpn.net/c/openvpn/+/1022/comment/9828d2a3_64a0b942 : PS1, Line 1151: char *str =3D BSTR(&buf); this looks more fumbly than needed - why deal with a `buffer` here if all y= ou want is a `*str`? I'd change this to ``` char * str =3D gc_malloc(PATH_MAX, false, gc); ...fgets(str, PATH_MAX, fp)... ``` (PATH_MAX is just conveniently lying around and of about the right size, to= avoid having magic numbers here) -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1022?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: I7fc033a7ffee73045316763356a95d75ef23f5ad Gerrit-Change-Number: 1022 Gerrit-PatchSet: 1 Gerrit-Owner: ralf_lici Gerrit-Reviewer: cron2 Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: ordex Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-Attention: flichtenheld Gerrit-Attention: ralf_lici Gerrit-Comment-Date: Thu, 15 May 2025 06:20:42 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment --z7iSpwyEoww= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is currently required from: flichtenheld, plaisthos, ralf_lic= i.

Patch set 1:Code-Review -1=

V= iew Change

1 comment:

  • File src/openvpn/dco_linux.c:

    • Patch Set #1, Line = 1151: char *str =3D= BSTR(&buf);

      this looks more fumbly than needed - why deal with a `buffer` he= re if all you want is a `*str`? I'd change this to

      ```
      char * str =3D gc_malloc(= PATH_MAX, false, gc);

      ...fgets(str, PATH_MAX, fp)...
      ```

      (PATH_MAX is just conveniently lying arou= nd and of about the right size, to avoid having magic numbers here)

To view, visit change 1022. To unsubscribe, or for help writ= ing mail filters, visit sett= ings.

<= link itemprop=3D"url" href=3D"http://gerrit.openvpn.net/c/openvpn/+/1022?us= p=3Demail"/>
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I7fc033a7ffee73045316763356a= 95d75ef23f5ad
Gerrit-Change-Number: 1022
Gerrit-PatchSet: 1
Gerrit-Owner: ralf_lici <ralf@...2726...>= ;
Gerrit-Reviewer: cron2 <gert@...1296...>=
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-Reviewer: ordex <antonio@...2726...&= gt;
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
Gerrit-Attention: flichtenheld <frank@...2375...= 41...>
Gerrit-Attention: ralf_lici <ralf@...2804...= .>
Gerrit-Comment-Date: Thu, 15 May 2025 06:20:42= +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
--z7iSpwyEoww=--