mirror of
https://github.com/systemd/systemd.git
synced 2024-11-02 10:51:20 +03:00
efi: make sure parse_boolean() does something useful on a NULL parameter
This commit is contained in:
parent
427ee7ec82
commit
95a18e91db
@ -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 ||
|
||||
|
Loading…
Reference in New Issue
Block a user