diff options
| author | Peter Jones <pjones@redhat.com> | 2018-03-06 15:16:51 -0500 |
|---|---|---|
| committer | Peter Jones <pjones@redhat.com> | 2018-03-06 15:28:00 -0500 |
| commit | 6c8d08c0af4768c715b79c8ec25141d56e34f8b4 (patch) | |
| tree | cd7a574d3fc0f5fb68afed807ca168b572d38763 /shim.c | |
| parent | e2073885773e45d112aca457cbd730dc0551b9ee (diff) | |
| download | efi-boot-shim-6c8d08c0af4768c715b79c8ec25141d56e34f8b4.tar.gz efi-boot-shim-6c8d08c0af4768c715b79c8ec25141d56e34f8b4.zip | |
shim: Ignore UEFI LoadOptions that are just NUL characters.
I don't know when or why we ever see this, but it's easy enough to
avoid.
Resolves github issue #95
Signed-off-by: Peter Jones <pjones@redhat.com>
Diffstat (limited to 'shim.c')
| -rw-r--r-- | shim.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -2583,6 +2583,12 @@ EFI_STATUS set_second_stage (EFI_HANDLE image_handle) } /* + * Apparently sometimes we get L"\0\0"? Which isn't useful at all. + */ + if (is_all_nuls(li->LoadOptions, li->LoadOptionsSize)) + return EFI_SUCCESS; + + /* * Check and see if this is just a list of strings. If it's an * EFI_LOAD_OPTION, it'll be 0, since we know EndEntire device path * won't pass muster as UCS2-LE. |
