mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-04 09:18:38 +00:00
PRINCE: Fix potential out-of-bounds reads (CID 1248500, 1248503)
Since heroSetTable[] is an array of int, use >= ARRAYSIZE() instead of > sizeof().
This commit is contained in:
parent
b6302c6e51
commit
0579bf6f18
@ -54,7 +54,7 @@ Hero::~Hero() {
|
||||
bool Hero::loadAnimSet(uint32 animSetNr) {
|
||||
_animSetNr = animSetNr;
|
||||
|
||||
if (animSetNr > sizeof(heroSetTable)) {
|
||||
if (animSetNr >= ARRAYSIZE(heroSetTable)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user