diff options
author | Torbjörn Andersson | 2010-01-03 20:47:04 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2010-01-03 20:47:04 +0000 |
commit | c83058d30b8e58576e1604fc48581027b0a150d0 (patch) | |
tree | bdf0851906e7f5d9dc3c139d4550e2e1e9cc71b7 /engines | |
parent | f15db40927443953aeb880fac1d4093301004e03 (diff) | |
download | scummvm-rg350-c83058d30b8e58576e1604fc48581027b0a150d0.tar.gz scummvm-rg350-c83058d30b8e58576e1604fc48581027b0a150d0.tar.bz2 scummvm-rg350-c83058d30b8e58576e1604fc48581027b0a150d0.zip |
LordHoto spotted the same kind of overlapping strcpy() call in one more place.
I didn't notice it because it never executed that part when I used Valgrind.
svn-id: r46945
Diffstat (limited to 'engines')
-rw-r--r-- | engines/tinsel/detection.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/engines/tinsel/detection.cpp b/engines/tinsel/detection.cpp index 07db1772f9..859ceaf6fb 100644 --- a/engines/tinsel/detection.cpp +++ b/engines/tinsel/detection.cpp @@ -805,7 +805,12 @@ const ADGameDescription *TinselMetaEngine::fallbackDetect(const Common::FSList & char tempFilename[50]; strcpy(tempFilename, fileDesc->fileName); char *pOne = strchr(tempFilename, '1'); - if (pOne) strcpy(pOne, pOne + 1); + if (pOne) { + do { + *pOne = *(pOne + 1); + pOne++; + } while (*pOne); + } Common::String tstr(tempFilename); |