Module: Mesa Branch: master Commit: e7672080699d0d3593167efec40b17cca69e644a URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e7672080699d0d3593167efec40b17cca69e644a
Author: Danylo Piliaiev <[email protected]> Date: Mon Mar 15 20:32:52 2021 +0200 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 <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9609> --- src/freedreno/isa/ir3-cat5.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/freedreno/isa/ir3-cat5.xml b/src/freedreno/isa/ir3-cat5.xml index 2568f40c253..92697f6584c 100644 --- a/src/freedreno/isa/ir3-cat5.xml +++ b/src/freedreno/isa/ir3-cat5.xml @@ -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> _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
