diff options
author | Eugene Sandulenko | 2016-05-28 15:26:07 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-05-28 15:26:31 +0200 |
commit | 506549ae45e09b9c4c0c9c786077c429533ce53c (patch) | |
tree | b495db7f5831ec43e47561ed556885e6d368a6d9 /engines/parallaction | |
parent | b16c5439b0888bab10a8306660b56742f31d761a (diff) | |
download | scummvm-rg350-506549ae45e09b9c4c0c9c786077c429533ce53c.tar.gz scummvm-rg350-506549ae45e09b9c4c0c9c786077c429533ce53c.tar.bz2 scummvm-rg350-506549ae45e09b9c4c0c9c786077c429533ce53c.zip |
PARALLACTION: Safer string manipulation
Diffstat (limited to 'engines/parallaction')
-rw-r--r-- | engines/parallaction/parallaction_ns.cpp | 2 | ||||
-rw-r--r-- | engines/parallaction/saveload.cpp | 2 | ||||
-rw-r--r-- | engines/parallaction/sound_ns.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/engines/parallaction/parallaction_ns.cpp b/engines/parallaction/parallaction_ns.cpp index 144c2b3a98..5fd6d87985 100644 --- a/engines/parallaction/parallaction_ns.cpp +++ b/engines/parallaction/parallaction_ns.cpp @@ -395,7 +395,7 @@ void Parallaction_ns::changeLocation() { changeCharacter(locname.character()); } - strcpy(g_saveData1, locname.location()); + Common::strlcpy(g_saveData1, locname.location(), 30); parseLocation(g_saveData1); if (_location._startPosition.x != -1000) { diff --git a/engines/parallaction/saveload.cpp b/engines/parallaction/saveload.cpp index eff088d5ee..0f4ceae7a5 100644 --- a/engines/parallaction/saveload.cpp +++ b/engines/parallaction/saveload.cpp @@ -93,7 +93,7 @@ void SaveLoad_ns::doLoadGame(uint16 slot) { uint16 _si; for (_si = 0; _si < _vm->_numLocations; _si++) { s = f->readLine(); - strcpy(_vm->_locationNames[_si], s.c_str()); + Common::strlcpy(_vm->_locationNames[_si], s.c_str(), 32); s = f->readLine(); _vm->_localFlags[_si] = atoi(s.c_str()); diff --git a/engines/parallaction/sound_ns.cpp b/engines/parallaction/sound_ns.cpp index 6ee58cfdd6..6073f82b82 100644 --- a/engines/parallaction/sound_ns.cpp +++ b/engines/parallaction/sound_ns.cpp @@ -335,7 +335,7 @@ void SoundMan_ns::setMusicVolume(int value) { } void SoundMan_ns::setMusicFile(const char *filename) { - strcpy(_musicFile, filename); + Common::strlcpy(_musicFile, filename, PATH_LEN); } void SoundMan_ns::execute(int command, const char *parm = 0) { |