On Wed, 29 May 2019 at 05:42, Gerd Hoffmann <kra...@redhat.com> wrote:
>
> From: Marc-André Lureau <marcandre.lur...@redhat.com>
>
> Add a vhost-user gpu backend, based on virtio-gpu/3d device. It is
> associated with a vhost-user-gpu device.
>
> Various TODO and nice to have items:
> - multi-head support
> - crash & resume handling
> - accelerated rendering/display that avoids the waiting round trips
> - edid support
>
> Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com>
> Message-id: 20190524130946.31736-6-marcandre.lur...@redhat.com
> Signed-off-by: Gerd Hoffmann <kra...@redhat.com>

Hi; Coverity spotted an issue with this patch (CID 1401705):

> +int
> +main(int argc, char *argv[])
> +{


> +    if (opt_socket_path) {
> +        int lsock = unix_listen(opt_socket_path, &error_fatal);
> +        fd = accept(lsock, NULL, NULL);

Here we call unix_listen(), which can fail, but we don't check
for the error, so we can pass -1 to accept() as an fd, which is bogus.

> +        close(lsock);
> +    } else {
> +        fd = opt_fdnum;
> +    }

thanks
-- PMM

Reply via email to