mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 03:18:08 +02:00
nv50/ir: avoid array overrun when checking for supported mods
Reported by Coverity
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "10.2 10.3" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 874a9396c5)
This commit is contained in:
parent
a318e2f383
commit
31adc40680
2 changed files with 2 additions and 2 deletions
|
|
@ -449,7 +449,7 @@ TargetNV50::isModSupported(const Instruction *insn, int s, Modifier mod) const
|
|||
return false;
|
||||
}
|
||||
}
|
||||
if (s > 3)
|
||||
if (s >= 3)
|
||||
return false;
|
||||
return (mod & Modifier(opInfo[insn->op].srcMods[s])) == mod;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -423,7 +423,7 @@ TargetNVC0::isModSupported(const Instruction *insn, int s, Modifier mod) const
|
|||
return false;
|
||||
}
|
||||
}
|
||||
if (s > 3)
|
||||
if (s >= 3)
|
||||
return false;
|
||||
return (mod & Modifier(opInfo[insn->op].srcMods[s])) == mod;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue