nouveau/mme: fix OOB access inside while_ine builder test

Signed-off-by: Karol Herbst <git@karolherbst.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24544>
This commit is contained in:
Karol Herbst 2023-08-07 21:09:13 +02:00 committed by Marge Bot
parent 8483a59dde
commit 1bee6a35ec

View file

@ -292,7 +292,7 @@ TEST_F(mme_builder_test, while_ine)
for (unsigned i = 0; i < ARRAY_SIZE(cases); i++) {
const uint32_t inc = cases[i];
const uint32_t count = cases[ARRAY_SIZE(cases) - i];
const uint32_t count = cases[ARRAY_SIZE(cases) - i - 1];
const uint32_t bound = inc * count;
std::vector<uint32_t> params;