GermanAizek / WinRing0

WinRing0 is a hardware access library for Windows.
GNU General Public License v3.0
260 stars 61 forks source link

Correct BSOD issue #8

Closed ghost closed 1 year ago

ghost commented 1 year ago

I noticed this driver will bugcheck due to an invalid pointer reference. This happens when both nInBufferSize and lpOutBuffer are set to 0 for DeviceIoControl, leading to a buffer not being allocated.

DeviceIoControl(
  hDevice,
  0x9c402000,
  lpInBuffer,
  0,
  lpOutBuffer,
  0,
  lpBytesReturned,
  lpOverlapped);

This happens at in several places throughout the code. I believe I've corrected them all.

GermanAizek commented 1 year ago

@SecurityAndStuff, thank you very much for your contribution.