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

sev- sev at scummvm.org
Wed Mar 22 09:22:44 CET 2017


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:
a0253001d8 DIRECTOR: Added sanity check for broken score files


Commit: a0253001d837c1a937956c6e48bccfd50a07a188
    https://github.com/scummvm/scummvm/commit/a0253001d837c1a937956c6e48bccfd50a07a188
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2017-03-22T09:10:50+01:00

Commit Message:
DIRECTOR: Added sanity check for broken score files

Changed paths:
    engines/director/score.cpp


diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index 83fe6dd..609c8ab 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -317,7 +317,7 @@ void Score::loadFrames(Common::SeekableSubReadStreamEndian &stream) {
 	byte channelData[kChannelDataSize];
 	memset(channelData, 0, kChannelDataSize);
 
-	while (size != 0) {
+	while (size != 0 && !stream.eos()) {
 		uint16 frameSize = stream.readUint16();
 		debugC(kDebugLoading, 8, "++++ score frame %d (frameSize %d) size %d", _frames.size(), frameSize, size);
 		size -= frameSize;





More information about the Scummvm-git-logs mailing list