mirror of
https://github.com/reactos/reactos.git
synced 2024-11-24 12:03:31 +08: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
@ -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 New Issue
Block a user