Memory Labels Class: Correct bounds clamping in ProcessCODFile

This commit is contained in:
Lioncash 2015-04-16 15:44:06 -04:00
parent 04421079ea
commit a7eb2e79e5
1 changed files with 4 additions and 4 deletions

View File

@ -208,10 +208,10 @@ void CMemoryLabel::ProcessCODFile(BYTE * File, DWORD FileLen)
}
}
if (Length > 40)
{
Length = 40;
}
// Stay within label array bounds
if (Length > 39)
Length = 39;
memcpy(Label,CurrentPos,Length);
Label[Length] = '\0';