[Scummvm-cvs-logs] scummvm master -> f73901ca9adcab29d5e8d1d4c7dca36d16806b93

Strangerke Strangerke at scummvm.org
Sat Mar 15 10:27:01 CET 2014


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:
f73901ca9a VOYEUR: Add a check to avoid potential use of negative value as an array index


Commit: f73901ca9adcab29d5e8d1d4c7dca36d16806b93
    https://github.com/scummvm/scummvm/commit/f73901ca9adcab29d5e8d1d4c7dca36d16806b93
Author: Strangerke (strangerke at scummvm.org)
Date: 2014-03-15T10:23:42+01:00

Commit Message:
VOYEUR: Add a check to avoid potential use of negative value as an array index

Changed paths:
    engines/voyeur/files_threads.cpp



diff --git a/engines/voyeur/files_threads.cpp b/engines/voyeur/files_threads.cpp
index 98fe0d0..700944f 100644
--- a/engines/voyeur/files_threads.cpp
+++ b/engines/voyeur/files_threads.cpp
@@ -86,6 +86,9 @@ bool ThreadResource::loadAStack(int stackId) {
 }
 
 void ThreadResource::unloadAStack(int stackId) {
+	if (stackId < 0)
+		return;
+
 	if ((_vm->_stampFlags & 1) && _useCount[stackId]) {
 		if (--_useCount[stackId] == 0) {
 			_vm->_stampLibPtr->freeBoltMember(_vm->_controlPtr->_memberIds[stackId]);






More information about the Scummvm-git-logs mailing list