OSDN Git Service

tests/vhost-user-bridge.c: Sanity check socket path length
authorPeter Maydell <peter.maydell@linaro.org>
Wed, 1 Sep 2021 15:26:32 +0000 (16:26 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Sat, 4 Sep 2021 21:34:05 +0000 (17:34 -0400)
commitf88435148dd38a9c609de348abc9ae231f2dbfc0
tree2492a0e0ebbb1464b12fae99eeb066cc68268a9e
parentc6effa9cf59f0191865f2f65d8a7398abff0490f
tests/vhost-user-bridge.c: Sanity check socket path length

The vhost-user-bridge binary accepts a UNIX socket path on
the command line. Sanity check that this is short enough to
fit into a sockaddr_un before copying it in.

Fixes: Coverity CID 1432866
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20210901152632.25511-1-peter.maydell@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
tests/vhost-user-bridge.c