From 23cb6684b1659a64272b4f7a7441453883d7c3d8 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 12 Oct 2002 20:58:16 +0000 Subject: [PATCH] Fix buffer overflow when passing MAX to CopyRange. (Note: the local SMTP server on the CVS box appears to have gone down, so some CVS commit mails have probably been lost.) --- stepmania/src/NoteData.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stepmania/src/NoteData.cpp b/stepmania/src/NoteData.cpp index aa4f558307..ee57d1bdf9 100644 --- a/stepmania/src/NoteData.cpp +++ b/stepmania/src/NoteData.cpp @@ -187,7 +187,7 @@ void NoteData::CopyRange( NoteData* pFrom, int iFromIndexBegin, int iFromIndexEn // copy recorded TapNotes int f = iFromIndexBegin, t = iToIndexBegin; - while( f<=iFromIndexEnd ) + while( f<=iFromIndexEnd && f < MAX_TAP_NOTE_ROWS ) { for( int c=0; cm_TapNotes[c][f];