virtio-gpu: check if the resource already exists in virtio_gpu_load()
commitb0ee78ff31617937f44161bde7515a67c88748c7
authorLi Qiang <liq3ea@163.com>
Fri, 28 Jun 2019 16:13:58 +0000 (28 09:13 -0700)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 3 Jul 2019 08:51:06 +0000 (3 10:51 +0200)
tree75ca8a94c3546ff2643c16f2494313edf485bf7e
parenta7f85e03b94ffaca75332cddf06426fc85ac611a
virtio-gpu: check if the resource already exists in virtio_gpu_load()

While loading virtio-gpu, the data can be malicious, we
should check if the resource already exists.

Signed-off-by: Li Qiang <liq3ea@163.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 20190628161358.10400-1-liq3ea@163.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/display/virtio-gpu.c