[Scummvm-git-logs] scummvm master -> 78a19f1d23188cbdf19d299a4c2e7e089d7f74d9
Die4Ever
noreply at scummvm.org
Tue Sep 6 03:19:10 UTC 2022
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:
78a19f1d23 GROOVIE: Fix possible crash with incorrect seeks to endpos in roq.cpp
Commit: 78a19f1d23188cbdf19d299a4c2e7e089d7f74d9
https://github.com/scummvm/scummvm/commit/78a19f1d23188cbdf19d299a4c2e7e089d7f74d9
Author: lolovo (39863084+lolovo at users.noreply.github.com)
Date: 2022-09-05T22:19:05-05:00
Commit Message:
GROOVIE: Fix possible crash with incorrect seeks to endpos in roq.cpp
Fix bug - https://bugs.scummvm.org/ticket/13809
min value should be taken to pass assertion inside of seek to avoid crash using localized files
Changed paths:
engines/groovie/video/roq.cpp
diff --git a/engines/groovie/video/roq.cpp b/engines/groovie/video/roq.cpp
index 9ebf063fa2a..cd12975afab 100644
--- a/engines/groovie/video/roq.cpp
+++ b/engines/groovie/video/roq.cpp
@@ -496,7 +496,7 @@ bool ROQPlayer::processBlock() {
}
// Calculate where the block should end
- int32 endpos = _file->pos() + blockHeader.size;
+ int64 endpos = _file->pos() + blockHeader.size;
// Detect the end of the video
if (_file->eos()) {
@@ -547,7 +547,7 @@ bool ROQPlayer::processBlock() {
if (endpos != _file->pos()) {
warning("Groovie::ROQ: BLOCK %04x Should have ended at %d, and has ended at %d", blockHeader.type, endpos, (int)_file->pos());
warning("Ensure you've copied the files correctly according to the wiki.");
- _file->seek(endpos);
+ _file->seek(MIN(_file->pos(), endpos));
}
// End the frame when the graphics have been modified or when there's an error
return endframe || !ok;
More information about the Scummvm-git-logs
mailing list