mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 07:12:16 +00:00
- Fixed imprecise bound checking in ACS code.
It was possible to access 'playeringame[8]', outside the [0:7] buffer range. Discovered with GCC 4.9 + Address Sanitizer.
This commit is contained in:
parent
156d1e61fd
commit
d61c48db25
1 changed files with 2 additions and 2 deletions
|
@ -8790,7 +8790,7 @@ scriptwait:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PCD_PLAYERINGAME:
|
case PCD_PLAYERINGAME:
|
||||||
if (STACK(1) < 0 || STACK(1) > MAXPLAYERS)
|
if (STACK(1) < 0 || STACK(1) >= MAXPLAYERS)
|
||||||
{
|
{
|
||||||
STACK(1) = false;
|
STACK(1) = false;
|
||||||
}
|
}
|
||||||
|
@ -8801,7 +8801,7 @@ scriptwait:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PCD_PLAYERISBOT:
|
case PCD_PLAYERISBOT:
|
||||||
if (STACK(1) < 0 || STACK(1) > MAXPLAYERS || !playeringame[STACK(1)])
|
if (STACK(1) < 0 || STACK(1) >= MAXPLAYERS || !playeringame[STACK(1)])
|
||||||
{
|
{
|
||||||
STACK(1) = false;
|
STACK(1) = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue