From: "cron2 (Code Review)" Date: Fri, 19 Jan 2024 08:27:27 +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="08ZE7AXvsms="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: phase2_tcp_server: fix Coverity issue "Dereference after null check" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: flichtenheld Cc: plaisthos , openvpn-devel --08ZE7AXvsms= 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. ( http://gerrit.openvpn.net/c/ope= nvpn/+/490?usp=3Demail ) Change subject: phase2_tcp_server: fix Coverity issue "Dereference after nu= ll check" ...................................................................... Patch Set 1: Code-Review-1 (1 comment) File src/openvpn/socket.c: http://gerrit.openvpn.net/c/openvpn/+/490/comment/49bd721f_a0919cda : PS1, Line 2034: if (signal_received) I do not like checking `signal_received` here if what we're really interest= ed is `sig_info` (I do understand that bother are NULL or none of them, but= this way the code is still more confusing than necessary). This said, if we know `sig_info` is never NULL anyway, because there is onl= y a single caller, maybe a better fix would be ``` ASSERT(sig_info); volatile int *signal_received =3D &sig_info->signal_received; ``` at the beginning of the function. -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/490?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: I8ef199463d46303129a3f563fd9eace780a58b8a Gerrit-Change-Number: 490 Gerrit-PatchSet: 1 Gerrit-Owner: flichtenheld Gerrit-Reviewer: cron2 Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-Attention: flichtenheld Gerrit-Comment-Date: Fri, 19 Jan 2024 08:27:27 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment --08ZE7AXvsms= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is currently required from: flichtenheld, plaisthos.

Patch set 1:Code-Review -1=

Vi= ew Change

1 comment:

  • File src/openvpn/socket.c:

  • Patch Set #1, Line 2034:= if (si= gnal_received)

    I do not like checking `signal_received` here if what we're re= ally interested is `sig_info` (I do understand that bother are NULL or none= of them, but this way the code is still more confusing than necessary).

    This said, if w= e know `sig_info` is never NULL anyway, because there is only a single call= er, maybe a better fix would be

    ```
    ASSERT(sig_info);
    volatile int *signal_receive= d =3D &sig_info->signal_received;
    ```

    at the beginning of the function.

To view, visit change 490. To unsubscribe, or for help writi= ng mail filters, visit setti= ngs.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I8ef199463d46303129a3f563fd9= eace780a58b8a
Gerrit-Change-Number: 490
Gerrit-PatchSet: 1
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: Fri, 19 Jan 2024 08:27:27= +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
--08ZE7AXvsms=--