efi_loader: parameter check OutputString

Check the parameters against NULL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
This commit is contained in:
Heinrich Schuchardt 2019-05-18 18:11:54 +02:00
parent acee965263
commit b31ca6bf84

View File

@ -136,6 +136,11 @@ static efi_status_t EFIAPI efi_cout_output_string(
EFI_ENTRY("%p, %p", this, string);
if (!this || !string) {
ret = EFI_INVALID_PARAMETER;
goto out;
}
buf = malloc(utf16_utf8_strlen(string) + 1);
if (!buf) {
ret = EFI_OUT_OF_RESOURCES;