anv: Fix unintentional integer overflow in anv_CreateDmaBufImageINTEL
authorGwan-gyeong Mun <elongbug@gmail.com>
Sun, 20 Nov 2016 11:44:22 +0000 (20:44 +0900)
committerEmil Velikov <emil.l.velikov@gmail.com>
Tue, 22 Nov 2016 15:15:45 +0000 (15:15 +0000)
commite074a08a6ded3260f13111d0e23961dea2da2442
tree943420dc615d9fab9d334badcdb11b700dc799dd
parent69cc7d90f9f60d95cd570a4e87755a474554d41f
anv: Fix unintentional integer overflow in anv_CreateDmaBufImageINTEL

Since both pCreateInfo->strideInBytes and pCreateInfo->extent.height
are of uint32_t type 32-bit arithmetic will be used.

Fix unintentional integer overflow by casting to uint64_t before
multifying.

CID 1394321

Cc: "13.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Mun Gwan-gyeong <elongbug@gmail.com>
[Emil Velikov: cast only of the arguments]
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/intel/vulkan/anv_intel.c