[BOOT] Create input parameters structures.
This commit is contained in:
@@ -15,6 +15,16 @@ Abstract:
|
||||
|
||||
#include "bootlib.h"
|
||||
|
||||
//
|
||||
// Total size of required structures.
|
||||
//
|
||||
#define MIN_INPUT_PARAMETERS_SIZE ( \
|
||||
sizeof(BOOT_INPUT_PARAMETERS) + \
|
||||
sizeof(BOOT_MEMORY_INFO) + \
|
||||
sizeof(BOOT_FIRMWARE_DATA) + \
|
||||
sizeof(BOOT_RETURN_DATA) \
|
||||
)
|
||||
|
||||
NTSTATUS
|
||||
InitializeLibrary (
|
||||
IN PBOOT_INPUT_PARAMETERS InputParameters,
|
||||
@@ -45,7 +55,9 @@ Return Value:
|
||||
//
|
||||
// Verify input parameters structure.
|
||||
//
|
||||
if (InputParameters == NULL || InputParameters->Signature != BOOT_INPUT_PARAMETERS_SIGNATURE) {
|
||||
if (InputParameters == NULL ||
|
||||
InputParameters->Signature != BOOT_INPUT_PARAMETERS_SIGNATURE ||
|
||||
InputParameters->Size < MIN_INPUT_PARAMETERS_SIZE) {
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user