From 5c16c47c546e8edc07244e788d66fa784cd4713e Mon Sep 17 00:00:00 2001 From: Aleksandar Andrejevic Date: Sun, 14 Jun 2015 01:37:56 +0000 Subject: [PATCH] [NTOS|MM] Return STATUS_INVALID_IMAGE_PROTECT if the NT header can't be read from the file. svn path=/trunk/; revision=68126 --- reactos/ntoskrnl/mm/section.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/ntoskrnl/mm/section.c b/reactos/ntoskrnl/mm/section.c index ad43250fdfa..02ae3615eba 100644 --- a/reactos/ntoskrnl/mm/section.c +++ b/reactos/ntoskrnl/mm/section.c @@ -286,7 +286,7 @@ l_ReadHeaderFromFile: NTSTATUS ReturnedStatus = nStatus; /* If it attempted to read past the end of the file, it means e_lfanew is invalid */ - if (ReturnedStatus == STATUS_END_OF_FILE) nStatus = STATUS_ROS_EXEFMT_UNKNOWN_FORMAT; + if (ReturnedStatus == STATUS_END_OF_FILE) nStatus = STATUS_INVALID_IMAGE_PROTECT; DIE(("ReadFile failed, status %08X\n", ReturnedStatus)); }