diff options
author | 2018-07-04 12:42:50 +0300 | |
---|---|---|
committer | 2018-08-30 09:41:03 +0200 | |
commit | 09c4b49457434fa74749ad6194ef28464d9f5df9 (patch) | |
tree | 5141c28051d7c90204ddaf1e7729cf70f2c8e0d2 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | drm/virtio: Replace ttm_bo_unref with ttm_bo_put (diff) | |
download | wireguard-linux-09c4b49457434fa74749ad6194ef28464d9f5df9.tar.xz wireguard-linux-09c4b49457434fa74749ad6194ef28464d9f5df9.zip |
drm/virtio: fix bounds check in virtio_gpu_cmd_get_capset()
This doesn't affect runtime because in the current code "idx" is always
valid.
First, we read from "vgdev->capsets[idx].max_size" before checking
whether "idx" is within bounds. And secondly the bounds check is off by
one so we could end up reading one element beyond the end of the
vgdev->capsets[] array.
Fixes: 62fb7a5e1096 ("virtio-gpu: add 3d/virgl support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20180704094250.m7sgvvzg3dhcvv3h@kili.mountain
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions