anv: fix potential integer overflow
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Mon, 26 Dec 2022 22:32:16 +0000 (00:32 +0200)
committerMarge Bot <emma+marge@anholt.net>
Tue, 27 Dec 2022 14:21:44 +0000 (14:21 +0000)
commitafdbed9e9c370931c72185f7094dcb3422888ce4
tree8338a44b050745bab4a793473c131a95d08ac1db
parenteb2576902d9f5b068f4cac308c64942344fcb2dd
anv: fix potential integer overflow

The loop going from 0 to max_draw_count multiplies the value which
could potentially overflow.

Fixes Coverity CID 1517852

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 3596a8ea7a ("anv: factor out some indirect draw count entry points")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20436>
src/intel/vulkan/genX_cmd_buffer.c