diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2018-11-06 15:13:20 +0000 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-11-10 15:07:53 +0100 |
commit | c41868152a95db5f759bb7da491615eca99e9a40 (patch) | |
tree | 0eaebf3374fc41b25121b9cfc940fefa04b34649 /slirp/Makefile.objs | |
parent | 160e5c22e55b3f775c2003dfc626fa872ee4a7a1 (diff) | |
download | qemu-c41868152a95db5f759bb7da491615eca99e9a40.zip qemu-c41868152a95db5f759bb7da491615eca99e9a40.tar.gz qemu-c41868152a95db5f759bb7da491615eca99e9a40.tar.bz2 |
slirp: Don't pass possibly -1 fd to send()
Coverity complains (CID 1005726) that we might pass -1 as the fd
argument to send() in slirp_send(), because we previously checked for
"so->s == -1 && so->extra". The case of "so->s == -1 but so->extra
NULL" should not in theory happen, but it is hard to guarantee
because various places in the code do so->s = qemu_socket(...) and so
will end up with so->s == -1 on failure, and not all the paths which
call that always throw away the socket in that case (eg
tcp_fconnect()). So just check specifically for the condition and
fail slirp_send().
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Diffstat (limited to 'slirp/Makefile.objs')
0 files changed, 0 insertions, 0 deletions