aboutgitcodebugslistschat
path: root/test/lib
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2023-11-07 12:04:33 +0100
committerStefano Brivio <sbrivio@redhat.com>2023-11-07 12:24:27 +0100
commit9494a51a4e079f4aead3e07a6bdf1c43b4516133 (patch)
tree1b7d57686372911ad0c6dbcc60cde7ef5085d128 /test/lib
parentb94462296937f59e3750e1c35b80b69a67a535af (diff)
downloadpasst-9494a51a4e079f4aead3e07a6bdf1c43b4516133.tar
passt-9494a51a4e079f4aead3e07a6bdf1c43b4516133.tar.gz
passt-9494a51a4e079f4aead3e07a6bdf1c43b4516133.tar.bz2
passt-9494a51a4e079f4aead3e07a6bdf1c43b4516133.tar.lz
passt-9494a51a4e079f4aead3e07a6bdf1c43b4516133.tar.xz
passt-9494a51a4e079f4aead3e07a6bdf1c43b4516133.tar.zst
passt-9494a51a4e079f4aead3e07a6bdf1c43b4516133.zip
port_fwd: Don't try to read bound ports from invalid file handles
This is a minimal fix for what would be reported by Coverity as "Improper use of negative value" (CWE-394): port_fwd_init() doesn't guarantee that all the pre-opened file handles are actually valid. We should probably warn on failing open() and open_in_ns() in port_fwd_init(), too, but that's outside the scope of this minimal fix. Before commit 5a0485425bc9 ("port_fwd: Pre-open /proc/net/* files rather than on-demand"), we used to have a single open() call and a check after it. Fixes: 5a0485425bc9 ("port_fwd: Pre-open /proc/net/* files rather than on-demand") Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'test/lib')
0 files changed, 0 insertions, 0 deletions