diff options
| author | Javier Martinez Canillas <javierm@redhat.com> | 2021-03-15 13:23:39 +0100 |
|---|---|---|
| committer | Peter Jones <pjones@redhat.com> | 2021-03-15 11:03:10 -0400 |
| commit | 711cd1ab2f7a681693e5b6405873fa5a07821f4a (patch) | |
| tree | 1b3e8c4427afce189592fb941668c3d555d5bbd7 | |
| parent | 39b96c01bfd4547f38c9e573ff5d551057ea272c (diff) | |
| download | efi-boot-shim-711cd1ab2f7a681693e5b6405873fa5a07821f4a.tar.gz efi-boot-shim-711cd1ab2f7a681693e5b6405873fa5a07821f4a.zip | |
shim: Fix a NULL pointer dereference caused by start not being set
Commit 018b74d2d69 ("shim: attempt to improve the argument handling") added
added workarounds for a couple of LoadOption problems on some systems, but
introduced a regression since the is_our_path() function can be called with
a NULL start UCS-2 string.
If there's only one string, set start to the start of LoadOptions.
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
| -rw-r--r-- | shim.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1520,7 +1520,7 @@ EFI_STATUS set_second_stage (EFI_HANDLE image_handle) * case. */ if (strings == 1) { - UINT16 *cur = li->LoadOptions; + UINT16 *cur = start = li->LoadOptions; /* replace L' ' with L'\0' if we find any */ for (i = 0; i < li->LoadOptionsSize / 2; i++) { |
