[Scummvm-git-logs] scummvm master -> 997e15878ad72e773ca3835b756daf02d0f7334d

bgK bastien.bouclet at gmail.com
Sun Sep 8 20:02:40 CEST 2019


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

Summary:
042e196488 GRAPHICS: Fix VectorRenderer's colorFillClip to apply the clipping rect
997e15878a HDB: Fix out of bounds read in HDBGame::setInMapName


Commit: 042e1964882d0d1387349f3a9d40d5aa7fe3399f
    https://github.com/scummvm/scummvm/commit/042e1964882d0d1387349f3a9d40d5aa7fe3399f
Author: Bastien Bouclet (bastien.bouclet at gmail.com)
Date: 2019-09-08T19:55:23+02:00

Commit Message:
GRAPHICS: Fix VectorRenderer's colorFillClip to apply the clipping rect

Changed paths:
    graphics/VectorRendererSpec.cpp


diff --git a/graphics/VectorRendererSpec.cpp b/graphics/VectorRendererSpec.cpp
index 2f7164c..a13c281 100644
--- a/graphics/VectorRendererSpec.cpp
+++ b/graphics/VectorRendererSpec.cpp
@@ -474,6 +474,7 @@ void colorFillClip(PixelType *first, PixelType *last, PixelType color, int realX
 	if (realX < clippingArea.left) {
 		int diff = (clippingArea.left - realX);
 		realX += diff;
+		first += diff;
 		count -= diff;
 	}
 


Commit: 997e15878ad72e773ca3835b756daf02d0f7334d
    https://github.com/scummvm/scummvm/commit/997e15878ad72e773ca3835b756daf02d0f7334d
Author: Bastien Bouclet (bastien.bouclet at gmail.com)
Date: 2019-09-08T19:55:23+02:00

Commit Message:
HDB: Fix out of bounds read in HDBGame::setInMapName

Changed paths:
    engines/hdb/hdb.cpp


diff --git a/engines/hdb/hdb.cpp b/engines/hdb/hdb.cpp
index 82e377d..b7fdf30 100644
--- a/engines/hdb/hdb.cpp
+++ b/engines/hdb/hdb.cpp
@@ -849,7 +849,7 @@ void HDBGame::drawLoadingScreen() {
 
 struct MapName {
 	const char *fName, *printName;
-} mapNames[] = {
+} static mapNames[] = {
 	{	"MAP00",			"HDS Colby Jack" },
 	{	"MAP01",			"Servandrones, Inc." },
 	{	"MAP02",			"Pushbot Storage" },
@@ -884,15 +884,12 @@ struct MapName {
 };
 
 void HDBGame::setInMapName(const char *name) {
-	int i = 0;
-
-	while (mapNames[i].fName) {
+	for (uint i = 0; i < ARRAYSIZE(mapNames); i++) {
 		if (!scumm_stricmp(name, mapNames[i].fName)) {
 			memset(&_inMapName, 0, 32);
 			strcpy(_inMapName, mapNames[i].printName);
 			return;
 		}
-		i++;
 	}
 
 	memset(&_inMapName, 0, 32);





More information about the Scummvm-git-logs mailing list