[Scummvm-git-logs] scummvm master -> 9caf6d44bbbf1a8f1121e60484e39037052c4fa0

sluicebox noreply at scummvm.org
Wed Nov 12 02:19:54 UTC 2025


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

Summary:
9caf6d44bb COMMON: Fix memory leak in StuffIt decompressor


Commit: 9caf6d44bbbf1a8f1121e60484e39037052c4fa0
    https://github.com/scummvm/scummvm/commit/9caf6d44bbbf1a8f1121e60484e39037052c4fa0
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2025-11-11T18:18:54-08:00

Commit Message:
COMMON: Fix memory leak in StuffIt decompressor

Changed paths:
    common/compression/stuffit.cpp


diff --git a/common/compression/stuffit.cpp b/common/compression/stuffit.cpp
index 069d56c941c..ff8b1e4c2e1 100644
--- a/common/compression/stuffit.cpp
+++ b/common/compression/stuffit.cpp
@@ -1001,7 +1001,10 @@ bool StuffItArchive::decompress13(Common::SeekableReadStream *src, byte *dst, ui
 	j = bits.getBits<8>();
 	i = j>>4;
 	if(i > 5)
+	{
+		delete s;
 		return false;
+	}
 	if(i)
 	{
 		SIT13InitInfo(s, i--);
@@ -1019,7 +1022,9 @@ bool StuffItArchive::decompress13(Common::SeekableReadStream *src, byte *dst, ui
 		j = (j&7)+10;
 		SIT13_CreateTree(s, &bits, s->Buffer2, j);
 	}
-	return SIT13_Extract(s, &bits, out);
+	bool result = SIT13_Extract(s, &bits, out);
+	delete s;
+	return result;
 }
 
 #define OUTPUT_VAL(x) \




More information about the Scummvm-git-logs mailing list