[Scummvm-git-logs] scummvm master -> b127144134e84e7c3dba696ddcc693e3bd5122c9

phcoder noreply at scummvm.org
Tue May 23 23:55:59 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:
b127144134 BLADERUNNER: Add assertion for undershort files


Commit: b127144134e84e7c3dba696ddcc693e3bd5122c9
    https://github.com/scummvm/scummvm/commit/b127144134e84e7c3dba696ddcc693e3bd5122c9
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2023-05-24T01:55:55+02:00

Commit Message:
BLADERUNNER: Add assertion for undershort files

Changed paths:
    engines/bladerunner/text_resource.cpp


diff --git a/engines/bladerunner/text_resource.cpp b/engines/bladerunner/text_resource.cpp
index 7e2f364c9c3..ccdf668b413 100644
--- a/engines/bladerunner/text_resource.cpp
+++ b/engines/bladerunner/text_resource.cpp
@@ -59,6 +59,8 @@ bool TextResource::open(const Common::String &name, bool localized) {
 
 	_count = s->readUint32LE();
 
+	assert(s->size() >= 4 * (2 * _count + 1));
+
 	_ids = new uint32[_count];
 	_offsets = new uint32[_count + 1];
 




More information about the Scummvm-git-logs mailing list