[Scummvm-cvs-logs] SF.net SVN: scummvm:[46945] scummvm/trunk/engines/tinsel/detection.cpp
eriktorbjorn at users.sourceforge.net
eriktorbjorn at users.sourceforge.net
Sun Jan 3 21:47:07 CET 2010
Revision: 46945
http://scummvm.svn.sourceforge.net/scummvm/?rev=46945&view=rev
Author: eriktorbjorn
Date: 2010-01-03 20:47:04 +0000 (Sun, 03 Jan 2010)
Log Message:
-----------
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.
Modified Paths:
--------------
scummvm/trunk/engines/tinsel/detection.cpp
Modified: scummvm/trunk/engines/tinsel/detection.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/detection.cpp 2010-01-03 20:42:51 UTC (rev 46944)
+++ scummvm/trunk/engines/tinsel/detection.cpp 2010-01-03 20:47:04 UTC (rev 46945)
@@ -805,7 +805,12 @@
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);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list