From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Brivio To: passt-dev@passt.top Subject: [PATCH 11/16] tcp: Dereference null return value, CWE-476 Date: Tue, 05 Apr 2022 19:05:09 +0200 Message-ID: <20220405170514.2963773-12-sbrivio@redhat.com> In-Reply-To: <20220405170514.2963773-1-sbrivio@redhat.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8959515988301277677==" --===============8959515988301277677== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Not an issue with a sane kernel behaviour. Reported by Coverity. Signed-off-by: Stefano Brivio --- tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcp.c b/tcp.c index 92cefab..1820e19 100644 --- a/tcp.c +++ b/tcp.c @@ -2729,7 +2729,7 @@ int tcp_tap_handler(struct ctx *c, int af, const void *= addr, =20 /* New connection from tap */ if (!conn) { - if (th->syn && !th->ack) + if (opts && th->syn && !th->ack) tcp_conn_from_tap(c, af, addr, th, opts, optlen, now); return 1; } --=20 2.35.1 --===============8959515988301277677==--