From 8ea123a15e75a69a4e7f2ce1831d4611f72e5417 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 14 Jul 2007 18:19:58 +0000 Subject: [PATCH] fix read out of bounds --- stepmania/src/RageFileDriverZip.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stepmania/src/RageFileDriverZip.cpp b/stepmania/src/RageFileDriverZip.cpp index 416781a50f..a228f3e638 100644 --- a/stepmania/src/RageFileDriverZip.cpp +++ b/stepmania/src/RageFileDriverZip.cpp @@ -114,7 +114,7 @@ bool RageFileDriverZip::SeekToEndCentralRecord() return false; } - for( int iPos = iGot; iPos >= 0; --iPos ) + for( int iPos = iGot - 4; iPos >= 0; --iPos ) { if( memcmp(buf + iPos, "\x50\x4B\x05\x06", 4) ) continue;