mesa/bufferobj: ensure that very large width+offset are always rejected
authorCorentin Noël <corentin.noel@collabora.com>
Thu, 26 Oct 2023 10:11:16 +0000 (12:11 +0200)
committerEric Engestrom <eric@engestrom.ch>
Mon, 30 Oct 2023 15:47:10 +0000 (15:47 +0000)
commitc9040f482e5ce3f57c344b193f3279db05b7a8a4
treef9afd8eba40351dcb2e3a823aa19f7d56f7b4957
parente3bef4dfa371dad053311687a13497df92451971
mesa/bufferobj: ensure that very large width+offset are always rejected

In the case width+offset is triggering an integer overflow, the checks in place
are not working as the comparison will fail.

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25909>
(cherry picked from commit e95c9b0515b85f65e00d47a152a881cc232a0d92)
.pick_status.json
src/mesa/main/bufferobj.c