ir3: fix oob access to regs array for getbuf,getinfo,rgetinfo

Since they have zero source registers, src->regs[1] is out of bounds.
It probably wasn't able to cause any harm, but it's always better
be safe.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4209

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9609>
This commit is contained in:
Danylo Piliaiev 2021-03-15 20:32:52 +02:00 committed by Marge Bot
parent 175925f84f
commit e767208069
1 changed files with 1 additions and 1 deletions

View File

@ -157,7 +157,7 @@ SOFTWARE.
-->
<map name="SRC1">extract_cat5_SRC(src, 1)</map>
<map name="SRC2">extract_cat5_SRC(src, 2)</map>
<map name="SRC3">src->regs[1]</map>
<map name="SRC3">(src->regs_count > 1) ? src->regs[1] : NULL</map>
</encode>
</bitset>