From: "flichtenheld (Code Review)" Date: Tue, 7 Oct 2025 10:52:03 +0000 In-Reply-To: References: Reply-To: frank@...2641..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, antonio@...2726... Message-ID: <2a52cdd406633c8471f42701e9908e0780fae97c-EmailReviewComments-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="cLC2IMONf1E="; charset=UTF-8 Subject: [Openvpn-devel] [M] Change in openvpn[master]: sitnl: Clean up type handling List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: plaisthos , openvpn-devel --cLC2IMONf1E= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: ordex, plaisthos. flichtenheld has posted comments on this change by flichtenheld. ( http://g= errit.openvpn.net/c/openvpn/+/1251?usp=3Demail ) Change subject: sitnl: Clean up type handling ...................................................................... Patch Set 3: (1 comment) File src/openvpn/networking_sitnl.c: http://gerrit.openvpn.net/c/openvpn/+/1251/comment/f96e2ed5_3791b0fb?usp=3D= email : PS3, Line 150: rta->rta_len =3D (unsigned short)len; > what happens if we rather make everything unsigned short instead of passi= ng through size_t? [=E2=80=A6] I still think it is better to use size_t for the arguments. We often use si= zeof for these arguments so some compiler might throw warnings at us. Bette= r to make the cast here later. But yes, we should add an assert here like in the other places. -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1251?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings?usp=3Demail Gerrit-MessageType: comment Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I20205ebd06bbf7cbee8c9be93f399961f5b74fcc Gerrit-Change-Number: 1251 Gerrit-PatchSet: 3 Gerrit-Owner: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-CC: ordex Gerrit-Attention: plaisthos Gerrit-Attention: ordex Gerrit-Comment-Date: Tue, 07 Oct 2025 10:52:03 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: ordex --cLC2IMONf1E= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is cur= rently required from: ordex, plaisthos.

View = Change

1 comment:

    =
  • File src/openvpn/networking_sitnl.c= :

    • Patc= h Set #3, Line 150: = rta->rta_len =3D (unsigned short)len;

      what happen= s if we rather make everything unsigned short instead of passing through si= ze_t? [=E2=80=A6]

      I still think it is better to use size_t= for the arguments. We often use sizeof for these arguments so some compile= r might throw warnings at us. Better to make the cast here later.

      But y= es, we should add an assert here like in the other places.

To view, visit change 1251. To unsubscribe, or for help writing mail = filters, visit s= ettings.

=
Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I20205ebd06bbf7cbee8c9be93f3= 99961f5b74fcc
Gerrit-Change-Number: 1251
Gerrit-PatchSet: 3
Gerrit-Owner: flichtenheld <frank@...2723...= .>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-CC: ordex <antonio@...2726...>
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
Gerrit-Attention: ordex <antonio@...2726...= >
Gerrit-Comment-Date: Tue, 07 Oct 2025 10:52:03= +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: ordex <antonio@...2787...= ...>
= --cLC2IMONf1E=--