Commit 112115bd authored by Christian Lupien's avatar Christian Lupien Committed by Alexandre Julliard

Avoid overflow in the read file limit check.

parent b3a4b596
......@@ -4746,7 +4746,7 @@ void WINAPI DOSVM_Int21Handler( CONTEXT86 *context )
/* Some programs pass a count larger than the allocated buffer */
if (DOSVM_IsWin16())
{
WORD maxcount = GetSelectorLimit16( context->SegDs )
DWORD maxcount = GetSelectorLimit16( context->SegDs )
- DX_reg(context) + 1;
if (count > maxcount)
count = maxcount;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment