diff options
author | Filippos Karapetis | 2014-12-23 02:20:17 +0200 |
---|---|---|
committer | Filippos Karapetis | 2014-12-23 02:20:17 +0200 |
commit | 99073f9b57580570b5ecec4cb00f020867f02672 (patch) | |
tree | e330a8f7dc506833e49667db4bab3a1d6bc819e8 /engines/zvision/scripting/controls/lever_control.cpp | |
parent | 7aeeeabba9de168e76ae4d82b7f033fc877d0671 (diff) | |
download | scummvm-rg350-99073f9b57580570b5ecec4cb00f020867f02672.tar.gz scummvm-rg350-99073f9b57580570b5ecec4cb00f020867f02672.tar.bz2 scummvm-rg350-99073f9b57580570b5ecec4cb00f020867f02672.zip |
ZVISION: Fix some buffer overruns with the usage of sscanf()
Diffstat (limited to 'engines/zvision/scripting/controls/lever_control.cpp')
-rw-r--r-- | engines/zvision/scripting/controls/lever_control.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/zvision/scripting/controls/lever_control.cpp b/engines/zvision/scripting/controls/lever_control.cpp index 8faa18357c..bef51f0e91 100644 --- a/engines/zvision/scripting/controls/lever_control.cpp +++ b/engines/zvision/scripting/controls/lever_control.cpp @@ -64,12 +64,12 @@ LeverControl::LeverControl(ZVision *engine, uint32 key, Common::SeekableReadStre while (!stream.eos() && !line.contains('}')) { if (param.matchString("descfile", true)) { char levFileName[25]; - sscanf(values.c_str(), "%25s", levFileName); + sscanf(values.c_str(), "%24s", levFileName); parseLevFile(levFileName); } else if (param.matchString("cursor", true)) { char cursorName[25]; - sscanf(values.c_str(), "%25s", cursorName); + sscanf(values.c_str(), "%24s", cursorName); _cursor = _engine->getCursorManager()->getCursorId(Common::String(cursorName)); } |