Commit 12d39054 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

rpcrt4: Fix the buffer bounds check.

parent 3b1ab769
...@@ -759,7 +759,7 @@ unsigned char *WINAPI NdrConformantStringUnmarshall( PMIDL_STUB_MESSAGE pStubMsg ...@@ -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);
......
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