From 8a65f44311657e2883646d67ec7dffdc4e2813b7 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Sun, 15 Sep 2019 00:03:11 +0100 Subject: HDB: Remove Another Fixed Size String Buffer This reduces the scope for buffer overflow issues. --- engines/hdb/lua-script.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'engines/hdb') diff --git a/engines/hdb/lua-script.cpp b/engines/hdb/lua-script.cpp index 13f406608b..82a52f7c24 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; -- cgit v1.2.3