rpcrt4: Fix the buffer bounds check.

This commit is contained in:
Dmitry Timoshkov 2007-07-19 14:56:18 +09:00 committed by Alexandre Julliard
parent 3b1ab76986
commit 12d3905427
1 changed files with 1 additions and 1 deletions

View File

@ -759,7 +759,7 @@ unsigned char *WINAPI NdrConformantStringUnmarshall( PMIDL_STUB_MESSAGE pStubMsg
/* verify the buffer is safe to access */ /* verify the buffer is safe to access */
if ((pStubMsg->Buffer + bufsize < pStubMsg->Buffer) || if ((pStubMsg->Buffer + bufsize < pStubMsg->Buffer) ||
(pStubMsg->Buffer + bufsize < pStubMsg->BufferEnd)) (pStubMsg->Buffer + bufsize > pStubMsg->BufferEnd))
{ {
ERR("bufsize 0x%x exceeded buffer end %p of buffer %p\n", bufsize, ERR("bufsize 0x%x exceeded buffer end %p of buffer %p\n", bufsize,
pStubMsg->BufferEnd, pStubMsg->Buffer); pStubMsg->BufferEnd, pStubMsg->Buffer);