mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 08:55:19 +00:00
[KMTEST] Add a NULL check
This commit is contained in:
parent
9e12af569f
commit
52fe43e87b
1 changed files with 6 additions and 0 deletions
|
@ -459,6 +459,11 @@ TestIrpHandler(
|
||||||
ok(Irp->AssociatedIrp.SystemBuffer == NULL, "A SystemBuffer was allocated!\n");
|
ok(Irp->AssociatedIrp.SystemBuffer == NULL, "A SystemBuffer was allocated!\n");
|
||||||
OrigBuffer = Buffer = MapAndLockUserBuffer(Irp, Length);
|
OrigBuffer = Buffer = MapAndLockUserBuffer(Irp, Length);
|
||||||
ok(Buffer != NULL, "Null pointer!\n");
|
ok(Buffer != NULL, "Null pointer!\n");
|
||||||
|
if (Buffer == NULL)
|
||||||
|
{
|
||||||
|
Status = STATUS_UNSUCCESSFUL;
|
||||||
|
goto Exit;
|
||||||
|
}
|
||||||
|
|
||||||
if (Offset.QuadPart < Fcb->Header.FileSize.QuadPart)
|
if (Offset.QuadPart < Fcb->Header.FileSize.QuadPart)
|
||||||
{
|
{
|
||||||
|
@ -545,6 +550,7 @@ TestIrpHandler(
|
||||||
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Exit:
|
||||||
FsRtlExitFileSystem();
|
FsRtlExitFileSystem();
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
|
|
Loading…
Reference in a new issue