[Scummvm-git-logs] scummvm master -> 3507830ced05d52408121fb562623631f288adb9

sluicebox noreply at scummvm.org
Sat Dec 18 20:01:38 UTC 2021


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:
3507830ced SCI: Fix kTextSize use-after-free


Commit: 3507830ced05d52408121fb562623631f288adb9
    https://github.com/scummvm/scummvm/commit/3507830ced05d52408121fb562623631f288adb9
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2021-12-18T15:00:29-05:00

Commit Message:
SCI: Fix kTextSize use-after-free

Introduced in b38d5b28ba2cbf3844ab75b005a91b138f515182

Changed paths:
    engines/sci/engine/kgraphics.cpp


diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp
index 94a42d9544..de435e9c3b 100644
--- a/engines/sci/engine/kgraphics.cpp
+++ b/engines/sci/engine/kgraphics.cpp
@@ -341,9 +341,10 @@ reg_t kTextSize(EngineState *s, int argc, reg_t *argv) {
 		return s->r_acc;
 	}
 
+	Common::String separatorString;
 	const char *separator = nullptr;
 	if ((argc > 4) && (argv[4].getSegment())) {
-		Common::String separatorString = s->_segMan->getString(argv[4]);
+		separatorString = s->_segMan->getString(argv[4]);
 		separator = separatorString.c_str();
 	}
 




More information about the Scummvm-git-logs mailing list