mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 12:23:31 +00:00
[NTOSKRNL]
- Print a warning instead of crashing when a driver provides a NULL pointer in the MajorFunction array svn path=/trunk/; revision=47308
This commit is contained in:
@@ -1556,11 +1556,14 @@ try_again:
|
||||
* Doing so is illegal; drivers shouldn't touch entry points they
|
||||
* do not implement.
|
||||
*/
|
||||
ASSERT(DriverObject->MajorFunction[i] != NULL);
|
||||
|
||||
/* Check if it did so anyway */
|
||||
if (!DriverObject->MajorFunction[i])
|
||||
if (!DriverObject->MajorFunction[i])
|
||||
{
|
||||
/* Print a warning in the debug log */
|
||||
DPRINT1("Driver <%wZ> set DriverObject->MajorFunction[%d] to NULL!\n",
|
||||
&DriverObject->DriverName, i);
|
||||
|
||||
/* Fix it up */
|
||||
DriverObject->MajorFunction[i] = IopInvalidDeviceRequest;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user