Permalink
Browse files

GameScript::SetPlayerSound: avoid out-of-bounds write

coverity 4419
  • Loading branch information...
1 parent 90999f6 commit b643f53db667faa20af0be129414eca55f1028ec @lynxlynxlynx lynxlynxlynx committed Apr 22, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 gemrb/core/GameScript/Actions.cpp
@@ -878,7 +878,7 @@ void GameScript::SetPlayerSound(Scriptable* Sender, Action* parameters)
if (!tar || tar->Type != ST_ACTOR) {
return;
}
- if (((ieDword) parameters->int0Parameter)>100) {
+ if (((ieDword) parameters->int0Parameter)>=100) {
Log(WARNING, "GameScript", "Invalid index %d in SetPlayerSound.", parameters->int0Parameter);
return;
}

0 comments on commit b643f53

Please sign in to comment.