[NTOSKNRL] Only allocate a MDL if we have an output length
authorPierre Schweitzer <pierre@reactos.org>
Sun, 29 Jul 2018 11:58:30 +0000 (13:58 +0200)
committerPierre Schweitzer <pierre@reactos.org>
Sun, 29 Jul 2018 11:58:30 +0000 (13:58 +0200)
commitcf3b9d5b56e1b0cf435139736e44711c752ad621
treebef02f7d7af6887ff593756f171ea748892b85fc
parent30830ca96399724915aa20a43a42fb8d850a1aff
[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 ;-)).
ntoskrnl/io/iomgr/iofunc.c