Skip to content
Snippets Groups Projects
Commit a95343b8 authored by Jonathan Gray's avatar Jonathan Gray Committed by Alexander Graf
Browse files

efi_loader: check CreateEvent() parameters


Add some of the invalid parameter checks described in the UEFI
specification for CreateEvent().  This does not include checking
the validity of the type and tpl parameters.

Signed-off-by: default avatarJonathan Gray <jsg@jsg.id.au>
Acked-By: default avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
[agraf: fix checkpatch.pl indent warning]
Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
parent 37a980b3
Branches
Tags
No related merge requests found
......@@ -189,6 +189,16 @@ static efi_status_t EFIAPI efi_create_event(
return EFI_EXIT(EFI_OUT_OF_RESOURCES);
}
if (event == NULL)
return EFI_EXIT(EFI_INVALID_PARAMETER);
if ((type & EVT_NOTIFY_SIGNAL) && (type & EVT_NOTIFY_WAIT))
return EFI_EXIT(EFI_INVALID_PARAMETER);
if ((type & (EVT_NOTIFY_SIGNAL|EVT_NOTIFY_WAIT)) &&
notify_function == NULL)
return EFI_EXIT(EFI_INVALID_PARAMETER);
efi_event.type = type;
efi_event.notify_tpl = notify_tpl;
efi_event.notify_function = notify_function;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment