mirror of
https://github.com/reactos/reactos.git
synced 2024-07-13 16:15:05 +00:00
- Validate the buffer size before copying to it
svn path=/trunk/; revision=40358
This commit is contained in:
parent
8f9cc82b53
commit
7d73a8c6e8
|
@ -126,6 +126,12 @@ VOID DGDeliverData(
|
|||
("Target Buffer: %x, Source Buffer: %x, Size %d\n",
|
||||
Current->Buffer, DataBuffer, DataSize));
|
||||
|
||||
if (DataSize > Current->BufferSize)
|
||||
{
|
||||
Current->Complete(Current->Context, STATUS_BUFFER_TOO_SMALL, DataSize);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Copy the data into buffer provided by the user */
|
||||
RtlCopyMemory( Current->Buffer,
|
||||
DataBuffer,
|
||||
|
|
Loading…
Reference in a new issue