Skip to content

Commit

Permalink
FULLPIPE: Fix out of bounds string access
Browse files Browse the repository at this point in the history
abe1c65 changed _trackName from a char * to a Common::String,
but still tried to access the null terminator byte.
  • Loading branch information
bgK committed Nov 26, 2017
1 parent 0bd2e53 commit 1e593a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion engines/fullpipe/sound.cpp
Expand Up @@ -332,7 +332,7 @@ int FullpipeEngine::getSceneTrack() {

int track = num + 1;

if (!_trackName[num + 2])
if (num + 2 >= (int)_trackName.size())
track = 0;

_musicGameVar->setSubVarAsInt("TRACKS", track);
Expand Down

0 comments on commit 1e593a4

Please sign in to comment.