aboutgitcodebugslistschat
path: root/qrap.c
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2023-02-27 03:05:26 +0100
committerStefano Brivio <sbrivio@redhat.com>2023-02-27 18:55:10 +0100
commita1d5537741679c117b4c1a9b736ea2540a976eee (patch)
tree7505bb36f600fc65b35688cf5c8c9036df5dedad /qrap.c
parent5474bc5485d814acae19961f9a9cd4b541722a5e (diff)
downloadpasst-a1d5537741679c117b4c1a9b736ea2540a976eee.tar
passt-a1d5537741679c117b4c1a9b736ea2540a976eee.tar.gz
passt-a1d5537741679c117b4c1a9b736ea2540a976eee.tar.bz2
passt-a1d5537741679c117b4c1a9b736ea2540a976eee.tar.lz
passt-a1d5537741679c117b4c1a9b736ea2540a976eee.tar.xz
passt-a1d5537741679c117b4c1a9b736ea2540a976eee.tar.zst
passt-a1d5537741679c117b4c1a9b736ea2540a976eee.zip
tcp: Avoid false (but convoluted) positive Coverity CWE-476 warning
If there are no TCP options in the header, tcp_tap_handler() will pass the corresponding pointer, fetched via packet_get(), as NULL to tcp_conn_from_sock_finish(), which in turn indirectly calls tcp_opt_get(). If there are no options, tcp_opt_get() will stop right away because the option length is indicated as zero. However, if the logic is complicated enough to follow for static checkers, adding an explicit check against NULL in tcp_opt_get() is probably a good idea. Signed-off-by: Stefano Brivio <sbrivio@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'qrap.c')
0 files changed, 0 insertions, 0 deletions