From: "cron2 (Code Review)" Date: Sun, 16 Nov 2025 18:53:03 +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="YdLr+0qcedQ="; charset=UTF-8 Subject: [Openvpn-devel] [S] Change in openvpn[master]: ssl: Clean up type handling in parse_early_negotiation_tlvs() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: flichtenheld Cc: plaisthos , openvpn-devel --YdLr+0qcedQ= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: flichtenheld, plaisthos. cron2 has posted comments on this change by flichtenheld. ( http://gerrit.o= penvpn.net/c/openvpn/+/1302?usp=3Demail ) Change subject: ssl: Clean up type handling in parse_early_negotiation_tlvs= () ...................................................................... Patch Set 6: Code-Review-1 (1 comment) Patchset: PS6: I don't like this one. Looking at `buf_read_u16()`, this is really an unsi= gned type, so parsing this as int and checking for `len < 0` is just wrong. Since there are not very many callers, I would tend to actually make it ret= urn a proper `uint16_t` - which is what `ntohs(ret)` produces anyway - and = fix those callers that need to be able to deal with negative values (if any= ). -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1302?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: Ie7ad637223c332f7611c09b20a8d7a3a92d97ec7 Gerrit-Change-Number: 1302 Gerrit-PatchSet: 6 Gerrit-Owner: flichtenheld Gerrit-Reviewer: cron2 Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-Attention: flichtenheld Gerrit-Comment-Date: Sun, 16 Nov 2025 18:53:03 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes --YdLr+0qcedQ= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

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

Patch set 6:Code-Review -1=

V= iew Change

1 comment:

  • Patchset:

    • Patch Set #6:

      I don't= like this one. Looking at `buf_read_u16()`, this is really an unsigned ty= pe, so parsing this as int and checking for `len < 0` is just wrong.

      =

      Since there are not very many callers, I would tend to actually make it re= turn a proper `uint16_t` - which is what `ntohs(ret)` produces anyway - and= fix those callers that need to be able to deal with negative values (if an= y).

To view, visit change 1302. To unsubscribe, or fo= r help writing mail filters, visit settings.

Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ie7ad637223c332f7611c09b20a8= d7a3a92d97ec7
Gerrit-Change-Number: 1302
Gerrit-PatchSet: 6
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>
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
Gerrit-Attention: flichtenheld <frank@...2375...= 41...>
Gerrit-Comment-Date: Sun, 16 Nov 2025 18:53:03= +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
= --YdLr+0qcedQ=--