diff options
author | Marisa-Chan | 2014-12-19 17:15:48 +0600 |
---|---|---|
committer | Marisa-Chan | 2014-12-19 17:15:48 +0600 |
commit | 6d1fcdbdbdf72d69eda6f458ff859bed7257410b (patch) | |
tree | 310b96b4d313cad1e00c22bcf6ef17be92a14ccb /engines/zvision/graphics/cursors | |
parent | 6c5c1828e1e7ed28865093de12156f6b99fdd40f (diff) | |
download | scummvm-rg350-6d1fcdbdbdf72d69eda6f458ff859bed7257410b.tar.gz scummvm-rg350-6d1fcdbdbdf72d69eda6f458ff859bed7257410b.tar.bz2 scummvm-rg350-6d1fcdbdbdf72d69eda6f458ff859bed7257410b.zip |
ZVISION: Fix copy into fixed size buffer (CID 1257093)
Diffstat (limited to 'engines/zvision/graphics/cursors')
-rw-r--r-- | engines/zvision/graphics/cursors/cursor_manager.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/zvision/graphics/cursors/cursor_manager.cpp b/engines/zvision/graphics/cursors/cursor_manager.cpp index ae13c9f4fc..92fd461c72 100644 --- a/engines/zvision/graphics/cursors/cursor_manager.cpp +++ b/engines/zvision/graphics/cursors/cursor_manager.cpp @@ -62,7 +62,8 @@ CursorManager::CursorManager(ZVision *engine, const Graphics::PixelFormat *pixel } else if (_engine->getGameId() == GID_GRANDINQUISITOR) { _cursors[i][0] = ZorkCursor(_engine, _zgiCursorFileNames[i]); // Up cursor char buffer[25]; - strcpy(buffer, _zgiCursorFileNames[i]); + memset(buffer, 0, 25); + strncpy(buffer, _zgiCursorFileNames[i], 24); buffer[3] += 2; _cursors[i][1] = ZorkCursor(_engine, buffer); // Down cursor } |