From 71a00f14493b261f41516beb72380372cc1e14d7 Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Tue, 5 Apr 2022 12:37:54 +0200 Subject: tcp: Dereference null return value, CWE-476 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(-) (limited to 'tcp.c') 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, /* 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; } -- cgit v1.2.3