pan/bi: Range check newc/oldc when rewriting
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Suggested-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7081>
This commit is contained in:
@@ -190,6 +190,8 @@ bi_rewrite_uses(bi_context *ctx,
|
||||
unsigned old, unsigned oldc,
|
||||
unsigned new, unsigned newc)
|
||||
{
|
||||
assert(newc >= oldc);
|
||||
|
||||
bi_foreach_instr_global(ctx, ins) {
|
||||
bi_foreach_src(ins, s) {
|
||||
if (ins->src[s] != old) continue;
|
||||
|
Reference in New Issue
Block a user