mirror of
https://github.com/reactos/reactos.git
synced 2024-12-29 10:35:28 +00:00
[NTOSKNRL] Only allocate a MDL if we have an output length
For user mode, when probing output buffer, if it's null, length will also be set to 0. This avoids user mode applications being able to trigger various asserts in ReactOS (and thus BSOD when no debugger is plugged ;-)).
This commit is contained in:
parent
30830ca963
commit
cf3b9d5b56
1 changed files with 1 additions and 1 deletions
|
@ -580,7 +580,7 @@ IopDeviceFsIoControl(IN HANDLE DeviceHandle,
|
|||
}
|
||||
|
||||
/* Check if we got an output buffer */
|
||||
if (OutputBuffer)
|
||||
if (OutputBufferLength)
|
||||
{
|
||||
/* Allocate the System Buffer */
|
||||
Irp->MdlAddress = IoAllocateMdl(OutputBuffer,
|
||||
|
|
Loading…
Reference in a new issue