Fixed bounds checking in ReadHandle routine (bug 3359).
This commit is contained in:
parent
253109d1c9
commit
a1d84347ed
@ -493,7 +493,7 @@ HandleError HandleSystem::GetHandle(Handle_t handle,
|
|||||||
unsigned int serial = (handle >> 16);
|
unsigned int serial = (handle >> 16);
|
||||||
unsigned int index = (handle & HANDLESYS_HANDLE_MASK);
|
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;
|
return HandleError_Index;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user