Fixed bounds checking in ReadHandle routine (bug 3359).

This commit is contained in:
David Anderson 2008-10-21 23:52:50 -07:00
parent 253109d1c9
commit a1d84347ed

View File

@ -493,7 +493,7 @@ HandleError HandleSystem::GetHandle(Handle_t handle,
unsigned int serial = (handle >> 16);
unsigned int index = (handle & HANDLESYS_HANDLE_MASK);
if (index == 0 || index == 0xFFFF)
if (index == 0 || index > m_HandleTail || index > HANDLESYS_MAX_HANDLES)
{
return HandleError_Index;
}