winsys/svga: Fix incorrect type usage in IOCTL v2
authorThomas Hellstrom <thellstrom@vmware.com>
Wed, 3 Sep 2014 09:14:51 +0000 (11:14 +0200)
committerThomas Hellstrom <thellstrom@vmware.com>
Thu, 4 Sep 2014 12:31:52 +0000 (14:31 +0200)
commit2d6206140afe9ecb551822ea00c36eeeef7edfbf
tree909ff6f145d83261a33d92b3dce82738ce9b6033
parent504f5f9d1a4fb5a0ddc8a5d0bf73fd6eba96b1d0
winsys/svga: Fix incorrect type usage in IOCTL v2

While similar in layout, the size of the SVGA3dSize type may be smaller than
the struct drm_vmw_size type that is part of the ioctl interface. The kernel
driver could accordingly overwrite a memory area following the size variable
on the stack. Typically that would be another local variable, causing
breakage in, for example, ubuntu 12.04.5 where the handle local variable
becomes overwritten.

v2: Fix whitespace errors

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Cc: "10.1 10.2 10.3" <mesa-stable@lists.freedesktop.org>
src/gallium/winsys/svga/drm/vmw_screen_dri.c