[Scummvm-git-logs] scummvm master -> 23f65282e646306607ea4db50b8449291fe2b800

bluegr noreply at scummvm.org
Sat Jun 17 21:49:13 UTC 2023


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:
23f65282e6 ENGINES: Prevent save description length overflow


Commit: 23f65282e646306607ea4db50b8449291fe2b800
    https://github.com/scummvm/scummvm/commit/23f65282e646306607ea4db50b8449291fe2b800
Author: Matthew Jimenez (matthew.jimenez at outlook.com)
Date: 2023-06-18T00:49:10+03:00

Commit Message:
ENGINES: Prevent save description length overflow

Changed paths:
    engines/metaengine.cpp


diff --git a/engines/metaengine.cpp b/engines/metaengine.cpp
index 5333e1543e3..153d0cd9a68 100644
--- a/engines/metaengine.cpp
+++ b/engines/metaengine.cpp
@@ -217,6 +217,9 @@ void MetaEngine::appendExtendedSaveToStream(Common::WriteStream *saveFile, uint3
 	saveFile->writeUint16LE(header.time);
 	saveFile->writeUint32LE(playtime);
 
+	if (desc.size() > 0xFF)
+		desc = desc.substr(0, 0xFF);
+
 	saveFile->writeByte(desc.size());
 	saveFile->writeString(desc);
 	saveFile->writeByte(isAutosave);




More information about the Scummvm-git-logs mailing list