[Scummvm-cvs-logs] scummvm master -> cbb403ff5599fb2a9f9876f1c8cb740820a96fff

sev- sev at scummvm.org
Mon May 16 16:57:36 CEST 2016


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:
1de6a461ab SCUMM HE: Clarify comment
dd1838a3cb LURE: Fix potential buffer overrun introduced in 8577606
c341738ab8 SAGA: Fix potential buffer overrun.
1d5a127011 SAGA: Add safeguard warning for text access.
f6d8e0f5ed SCI: Add virtual destructor
cbb403ff55 SHERLOCK: Remove non-virtual destructor which prevents the superclass one from execution.


Commit: 1de6a461ab7fd72b4ab112f99299f13d1edc6416
    https://github.com/scummvm/scummvm/commit/1de6a461ab7fd72b4ab112f99299f13d1edc6416
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-05-16T16:56:57+02:00

Commit Message:
SCUMM HE: Clarify comment

Changed paths:
    engines/scumm/he/script_v100he.cpp



diff --git a/engines/scumm/he/script_v100he.cpp b/engines/scumm/he/script_v100he.cpp
index 4388433..7fe1d88 100644
--- a/engines/scumm/he/script_v100he.cpp
+++ b/engines/scumm/he/script_v100he.cpp
@@ -625,7 +625,7 @@ void ScummEngine_v100he::o100_arrayOps() {
 		}
 		break;
 	case 132:			// SO_COMPLEX_ARRAY_MATH_OPERATION
-		// TODO: Used by room 2 script 2180 in Moonbase Commander
+		// TODO: Used by room 2 script 2180 in Moonbase Commander (modify-line-of-sight)
 		fetchScriptWord();
 		fetchScriptWord();
 		type = pop();


Commit: dd1838a3cbffa59f536f81536689fd2d87b672f4
    https://github.com/scummvm/scummvm/commit/dd1838a3cbffa59f536f81536689fd2d87b672f4
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-05-16T16:56:57+02:00

Commit Message:
LURE: Fix potential buffer overrun introduced in 8577606

Changed paths:
    engines/lure/hotspots.cpp



diff --git a/engines/lure/hotspots.cpp b/engines/lure/hotspots.cpp
index a972909..29e5d28 100644
--- a/engines/lure/hotspots.cpp
+++ b/engines/lure/hotspots.cpp
@@ -1925,7 +1925,7 @@ void Hotspot::doStatus(HotspotData *hotspot) {
 	if (numGroats > 0) {
 		Common::strlcat(buffer, "\n\n", MAX_DESC_SIZE);
 		Common::strlcat(buffer, stringList.getString(S_YOU_HAVE), MAX_DESC_SIZE);
-		snprintf(buffer + strlen(buffer), MAX_DESC_SIZE, "%d", numGroats);
+		snprintf(buffer + strlen(buffer), MAX_DESC_SIZE - strlen(buffer), "%d", numGroats);
 		Common::strlcat(buffer, " ", MAX_DESC_SIZE);
 		Common::strlcat(buffer, stringList.getString((numGroats == 1) ? S_GROAT : S_GROATS), MAX_DESC_SIZE); // Make sure we're not overrunning
 	}


Commit: c341738ab89a54a067749025f7c59b8c83b05b86
    https://github.com/scummvm/scummvm/commit/c341738ab89a54a067749025f7c59b8c83b05b86
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-05-16T16:56:57+02:00

Commit Message:
SAGA: Fix potential buffer overrun.

If we have _statusTextInputPos as 256, we're doing incrementing to 257
and storing 0 there. This will lead to memory overwrite.

Changed paths:
    engines/saga/interface.cpp



diff --git a/engines/saga/interface.cpp b/engines/saga/interface.cpp
index cb09d53..c16650d 100644
--- a/engines/saga/interface.cpp
+++ b/engines/saga/interface.cpp
@@ -1170,7 +1170,7 @@ void Interface::processStatusTextInput(Common::KeyState keystate) {
 		_statusTextInputPos--;
 		_statusTextInputString[_statusTextInputPos] = 0;
 	default:
-		if (_statusTextInputPos >= STATUS_TEXT_INPUT_MAX) {
+		if (_statusTextInputPos > STATUS_TEXT_INPUT_MAX) {
 			break;
 		}
 		if (Common::isAlnum(keystate.ascii) || (keystate.ascii == ' ')) {


Commit: 1d5a127011874f83fed44b7062143badb8447839
    https://github.com/scummvm/scummvm/commit/1d5a127011874f83fed44b7062143badb8447839
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-05-16T16:56:57+02:00

Commit Message:
SAGA: Add safeguard warning for text access.

Changed paths:
    engines/saga/interface.cpp



diff --git a/engines/saga/interface.cpp b/engines/saga/interface.cpp
index c16650d..b08534c 100644
--- a/engines/saga/interface.cpp
+++ b/engines/saga/interface.cpp
@@ -2299,6 +2299,9 @@ void Interface::drawPanelButtonText(InterfacePanel *panel, PanelButton *panelBut
 		break;
 	}
 	if (_vm->getGameId() == GID_ITE) {
+		if (textId > kTextEnterProtectAnswer)
+			error("This should not happen. Please report to ScummVM Team how you achieved this error.");
+
 		text = _vm->getTextString(textId);
 		textFont = kKnownFontMedium;
 		textShadowKnownColor = kKnownColorVerbTextShadow;


Commit: f6d8e0f5ed0ad40918912e3ec07ab658bdaaa147
    https://github.com/scummvm/scummvm/commit/f6d8e0f5ed0ad40918912e3ec07ab658bdaaa147
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-05-16T16:56:57+02:00

Commit Message:
SCI: Add virtual destructor

Changed paths:
    engines/sci/graphics/helpers.h



diff --git a/engines/sci/graphics/helpers.h b/engines/sci/graphics/helpers.h
index 19dddd7..cdb7d11 100644
--- a/engines/sci/graphics/helpers.h
+++ b/engines/sci/graphics/helpers.h
@@ -91,6 +91,8 @@ struct Window : public Port, public Common::Serializable {
 		bDrawn(false) {
 	}
 
+	~Window() {}
+
 	void syncRect(Common::Serializer &ser, Common::Rect &targetRect) {
 		ser.syncAsSint16LE(targetRect.top);
 		ser.syncAsSint16LE(targetRect.left);


Commit: cbb403ff5599fb2a9f9876f1c8cb740820a96fff
    https://github.com/scummvm/scummvm/commit/cbb403ff5599fb2a9f9876f1c8cb740820a96fff
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-05-16T16:56:57+02:00

Commit Message:
SHERLOCK: Remove non-virtual destructor which prevents the superclass one from execution.

Changed paths:
    engines/sherlock/image_file.cpp
    engines/sherlock/image_file.h



diff --git a/engines/sherlock/image_file.cpp b/engines/sherlock/image_file.cpp
index 1247a7f..c53e537 100644
--- a/engines/sherlock/image_file.cpp
+++ b/engines/sherlock/image_file.cpp
@@ -302,12 +302,6 @@ ImageFile3DO::ImageFile3DO(Common::SeekableReadStream &stream, bool isRoomData)
 	}
 }
 
-ImageFile3DO::~ImageFile3DO() {
-	// already done in ImageFile destructor
-	//for (uint idx = 0; idx < size(); ++idx)
-	//	(*this)[idx]._frame.free();
-}
-
 void ImageFile3DO::load(Common::SeekableReadStream &stream, bool isRoomData) {
 	uint32 headerId = 0;
 
@@ -380,7 +374,7 @@ void ImageFile3DO::loadAnimationFile(Common::SeekableReadStream &stream) {
 		if (streamLeft < celDataSize)
 			error("load3DOAnimationFile: expected cel data, not enough bytes");
 
-		// 
+		//
 		// Load data for frame and decompress it
 		byte *data = new byte[celDataSize];
 		stream.read(data, celDataSize);
@@ -683,7 +677,7 @@ void ImageFile3DO::load3DOCelRoomData(Common::SeekableReadStream &stream) {
 
 		if (ccbFlags & 0x200) // bit 9
 			ccbFlags_compressed = true;
-		
+
 		// PRE0 first 3 bits define how many bits per encoded pixel are used
 		ccbPRE0_bitsPerPixel = imagefile3DO_cel_bitsPerPixelLookupTable[ccbPRE0 & 0x07];
 		if (!ccbPRE0_bitsPerPixel)
@@ -713,7 +707,7 @@ void ImageFile3DO::load3DOCelRoomData(Common::SeekableReadStream &stream) {
 
 		stream.read(celDataPtr, celDataSize);
 		streamLeft -= celDataSize;
-		
+
 		// Set up frame
 		{
 			ImageFrame imageFrame;
diff --git a/engines/sherlock/image_file.h b/engines/sherlock/image_file.h
index 778332b..9c7612d 100644
--- a/engines/sherlock/image_file.h
+++ b/engines/sherlock/image_file.h
@@ -155,7 +155,6 @@ private:
 public:
 	ImageFile3DO(const Common::String &name, ImageFile3DOType imageFile3DOType);
 	ImageFile3DO(Common::SeekableReadStream &stream, bool isRoomData = false);
-	~ImageFile3DO();
 	static void setVm(SherlockEngine *vm);
 };
 






More information about the Scummvm-git-logs mailing list