diff options
author | Eugene Sandulenko | 2013-10-17 13:38:29 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2013-10-17 13:38:29 +0300 |
commit | df73f27f67eaa96e93f624ff641e20bd61f151d4 (patch) | |
tree | e2875b6c89218bbd51562e3b10fb5492fbc38a9c /engines/drascula | |
parent | eb7f7b9fb6c56c125a66b6496cbe712198c75395 (diff) | |
download | scummvm-rg350-df73f27f67eaa96e93f624ff641e20bd61f151d4.tar.gz scummvm-rg350-df73f27f67eaa96e93f624ff641e20bd61f151d4.tar.bz2 scummvm-rg350-df73f27f67eaa96e93f624ff641e20bd61f151d4.zip |
DRASCULA: Fix potential buffer overrun. CID 1003308
Diffstat (limited to 'engines/drascula')
-rw-r--r-- | engines/drascula/objects.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/drascula/objects.cpp b/engines/drascula/objects.cpp index 35dfd3162a..acc4bbf7ac 100644 --- a/engines/drascula/objects.cpp +++ b/engines/drascula/objects.cpp @@ -265,8 +265,9 @@ void DrasculaEngine::updateVisible() { } if (_roomNumber == 22 && flags[27] == 1) visible[3] = 0; - if (_roomNumber == 26 && flags[21] == 0) - strcpy(objName[2], _textmisc[0]); + if (_roomNumber == 26 && flags[21] == 0) { + strlcpy(objName[2], _textmisc[0], 20); + } if (_roomNumber == 26 && flags[18] == 1) visible[2] = 0; if (_roomNumber == 26 && flags[12] == 1) |