[Scummvm-git-logs] scummvm master -> 8a65f44311657e2883646d67ec7dffdc4e2813b7

digitall dgturner at iee.org
Sun Sep 15 01:07:19 CEST 2019


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

Summary:
8a65f44311 HDB: Remove Another Fixed Size String Buffer


Commit: 8a65f44311657e2883646d67ec7dffdc4e2813b7
    https://github.com/scummvm/scummvm/commit/8a65f44311657e2883646d67ec7dffdc4e2813b7
Author: D G Turner (digitall at scummvm.org)
Date: 2019-09-15T00:03:11+01:00

Commit Message:
HDB: Remove Another Fixed Size String Buffer

This reduces the scope for buffer overflow issues.

Changed paths:
    engines/hdb/lua-script.cpp


diff --git a/engines/hdb/lua-script.cpp b/engines/hdb/lua-script.cpp
index 13f4066..82a52f7 100644
--- a/engines/hdb/lua-script.cpp
+++ b/engines/hdb/lua-script.cpp
@@ -811,9 +811,8 @@ static int setEntDir(lua_State *L) {
 		int	dd = (int)d;
 		e->dir = (AIDir)dd;
 	} else {
-		char buff[64];
-		sprintf(buff, "Could not SetEntDir on '%s'", entName);
-		g_hdb->_window->openMessageBar(buff, 10);
+		Common::String entMessageString = Common::String::format("Could not SetEntDir on '%s'", entName);
+		g_hdb->_window->openMessageBar(entMessageString.c_str(), 10);
 	}
 
 	return 0;





More information about the Scummvm-git-logs mailing list