aboutgitcodebugslistschat
path: root/tcp.c
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2022-04-05 12:37:54 +0200
committerStefano Brivio <sbrivio@redhat.com>2022-04-07 11:44:35 +0200
commit71a00f14493b261f41516beb72380372cc1e14d7 (patch)
tree6db7637497e1d4736bc6263f35a1904793410d6a /tcp.c
parentceddcac74a6eafae8d959adcbfee17d4cae2c3a8 (diff)
downloadpasst-71a00f14493b261f41516beb72380372cc1e14d7.tar
passt-71a00f14493b261f41516beb72380372cc1e14d7.tar.gz
passt-71a00f14493b261f41516beb72380372cc1e14d7.tar.bz2
passt-71a00f14493b261f41516beb72380372cc1e14d7.tar.lz
passt-71a00f14493b261f41516beb72380372cc1e14d7.tar.xz
passt-71a00f14493b261f41516beb72380372cc1e14d7.tar.zst
passt-71a00f14493b261f41516beb72380372cc1e14d7.zip
tcp: Dereference null return value, CWE-476
Not an issue with a sane kernel behaviour. Reported by Coverity. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'tcp.c')
-rw-r--r--tcp.c2
1 files changed, 1 insertions, 1 deletions
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;
}