[Scummvm-cvs-logs] scummvm master -> 5a9d437866b8da4b7247e1e06fef2a0e92807310

sev- sev at scummvm.org
Fri Apr 26 07:09:17 CEST 2013


This automated email contains information about 6 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
eb3d556e15 CGE: Plug memory leak. CID 1003914
f70509e20b CINE: Null terminate string. CID 1003887
a8a267b668 CINE: Null terminate string. CID 1003884
9b8aa5e135 CINE: Null terminate string. CID 1003886
575179be7f CRUISE: Plug memory leak. CID 1003918
5a9d437866 CRUISE: Plug memory lek. CID 1003917


Commit: eb3d556e15cfc463b1fd0a2edee3c2493bf7cded
    https://github.com/scummvm/scummvm/commit/eb3d556e15cfc463b1fd0a2edee3c2493bf7cded
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-04-25T21:59:53-07:00

Commit Message:
CGE: Plug memory leak. CID 1003914

Changed paths:
    engines/cge/snail.cpp



diff --git a/engines/cge/snail.cpp b/engines/cge/snail.cpp
index 4cd95a8..edb8972 100644
--- a/engines/cge/snail.cpp
+++ b/engines/cge/snail.cpp
@@ -1199,6 +1199,8 @@ void CGEEngine::snFlash(bool on) {
 			}
 			_vga->setColors(pal, 64);
 		}
+
+		free(pal);
 	} else
 		_vga->setColors(_vga->_sysPal, 64);
 	_dark = false;


Commit: f70509e20bb4fb809cff5ae4bb9fdc47dd85e1e0
    https://github.com/scummvm/scummvm/commit/f70509e20bb4fb809cff5ae4bb9fdc47dd85e1e0
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-04-25T22:01:07-07:00

Commit Message:
CINE: Null terminate string. CID 1003887

Changed paths:
    engines/cine/detection.cpp



diff --git a/engines/cine/detection.cpp b/engines/cine/detection.cpp
index 823b8e3..a3d36cf 100644
--- a/engines/cine/detection.cpp
+++ b/engines/cine/detection.cpp
@@ -184,7 +184,7 @@ void CineMetaEngine::removeSaveState(const char *target, int slot) const {
 	// Set description for selected slot
 	char slotName[20];
 	slotName[0] = 0;
-	strncpy(saveNames[slot], slotName, 20);
+	Common::strlcpy(saveNames[slot], slotName, 20);
 
 	// Update savegame descriptions
 	Common::String indexFile = Common::String::format("%s.dir", target);


Commit: a8a267b6681343cde3dfdaf3251953a3055fbdff
    https://github.com/scummvm/scummvm/commit/a8a267b6681343cde3dfdaf3251953a3055fbdff
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-04-25T22:02:23-07:00

Commit Message:
CINE: Null terminate string. CID 1003884

Changed paths:
    engines/cine/script_fw.cpp



diff --git a/engines/cine/script_fw.cpp b/engines/cine/script_fw.cpp
index b4fe68c..209cda7 100644
--- a/engines/cine/script_fw.cpp
+++ b/engines/cine/script_fw.cpp
@@ -1727,7 +1727,7 @@ int FWScript::o1_loadMusic() {
 	debugC(5, kCineDebugScript, "Line: %d: loadMusic(%s)", _line, param);
 	g_sound->loadMusic(param);
 
-	strncpy(currentDatName, param, 30);
+	Common::strlcpy(currentDatName, param, 30);
 	musicIsPlaying = 0;
 
 	return 0;


Commit: 9b8aa5e1355af3e52f48ed9860675a0a392d83ce
    https://github.com/scummvm/scummvm/commit/9b8aa5e1355af3e52f48ed9860675a0a392d83ce
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-04-25T22:04:38-07:00

Commit Message:
CINE: Null terminate string. CID 1003886

Changed paths:
    engines/cine/various.cpp



diff --git a/engines/cine/various.cpp b/engines/cine/various.cpp
index 23f439a..99d93cf 100644
--- a/engines/cine/various.cpp
+++ b/engines/cine/various.cpp
@@ -427,7 +427,7 @@ void CineEngine::makeSystemMenu() {
 				if (!makeTextEntryMenu(otherMessages[6], saveName, 20, 120))
 					break;
 
-				strncpy(currentSaveName[selectedSave], saveName, 20);
+				Common::strlcpy(currentSaveName[selectedSave], saveName, 20);
 
 				sprintf(saveFileName, "%s.%1d", _targetName.c_str(), selectedSave);
 


Commit: 575179be7f0b2f8f2ffac78f7949070b90211776
    https://github.com/scummvm/scummvm/commit/575179be7f0b2f8f2ffac78f7949070b90211776
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-04-25T22:06:24-07:00

Commit Message:
CRUISE: Plug memory leak. CID 1003918

Changed paths:
    engines/cruise/dataLoader.cpp



diff --git a/engines/cruise/dataLoader.cpp b/engines/cruise/dataLoader.cpp
index 94d075e..a53f675 100644
--- a/engines/cruise/dataLoader.cpp
+++ b/engines/cruise/dataLoader.cpp
@@ -283,6 +283,7 @@ int loadFileRange(const char *name, int startIdx, int currentEntryIdx, int numId
 
 		for (i = 0; i < numIdx; i++) {
 			if ((startIdx + i) > numMaxEntriesInSet) {
+				MemFree(ptr);
 				return 0;	// exit if limit is reached
 			}
 			loadSetEntry(name, ptr, startIdx + i, currentEntryIdx + i);


Commit: 5a9d437866b8da4b7247e1e06fef2a0e92807310
    https://github.com/scummvm/scummvm/commit/5a9d437866b8da4b7247e1e06fef2a0e92807310
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-04-25T22:08:12-07:00

Commit Message:
CRUISE: Plug memory lek. CID 1003917

Changed paths:
    engines/cruise/dataLoader.cpp



diff --git a/engines/cruise/dataLoader.cpp b/engines/cruise/dataLoader.cpp
index a53f675..b2a319b 100644
--- a/engines/cruise/dataLoader.cpp
+++ b/engines/cruise/dataLoader.cpp
@@ -265,6 +265,8 @@ int loadFile(const char* name, int idx, int destIdx) {
 		error("Unknown fileType in loadFile");
 	}
 
+	MemFree(ptr);
+
 	return -1;
 }
 






More information about the Scummvm-git-logs mailing list