From 95a18e91db59028cf5e1848834fa754a8dab5b23 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 22 Oct 2018 16:45:32 +0200 Subject: [PATCH] efi: make sure parse_boolean() does something useful on a NULL parameter --- src/boot/efi/util.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/boot/efi/util.c b/src/boot/efi/util.c index a7bba3120b9..77d7b81fea5 100644 --- a/src/boot/efi/util.c +++ b/src/boot/efi/util.c @@ -60,6 +60,9 @@ UINT64 time_usec(VOID) { } EFI_STATUS parse_boolean(const CHAR8 *v, BOOLEAN *b) { + if (!v) + return EFI_INVALID_PARAMETER; + if (strcmpa(v, (CHAR8 *)"1") == 0 || strcmpa(v, (CHAR8 *)"yes") == 0 || strcmpa(v, (CHAR8 *)"y") == 0 ||