diff options
| author | Peter Jones <pjones@redhat.com> | 2025-03-12 16:00:30 -0400 |
|---|---|---|
| committer | Peter Jones <pjones@redhat.com> | 2025-03-14 11:05:05 -0400 |
| commit | db0432183680121df2fcaba2b697025fef9db6ac (patch) | |
| tree | d49a3f87f2508885d6ebae56ce7694357e352f08 /fallback.c | |
| parent | 38f0a9c2ee9635cbaab9d7d4aa4664027c913cee (diff) | |
| download | efi-boot-shim-db0432183680121df2fcaba2b697025fef9db6ac.tar.gz efi-boot-shim-db0432183680121df2fcaba2b697025fef9db6ac.zip | |
shim_load_image(): initialize the buffer fully
scan-build notes that we assign bprop.hnd, an EFI_HANDLE for the device
path protocol, to our loaded_image->li.DeviceHandle, and it thinks since
bprop is uninitialized that means it can be NULL or garbage.
I don't think that's actually true, because every path to that requires
either returning an error or doing some variety of:
status = BS->LocateDevicePath(&gEfiDevicePathProtocolGuid, &bp, &hnd)
and checking its error, but only one of those paths explicitly sets a
value, and static checkers can't tell what BS->LocateDevicePath does
with the pointer.
This patch avoids the issue by initializing the whole bprop structure to
begin with.
Signed-off-by: Peter Jones <pjones@redhat.com>
Diffstat (limited to 'fallback.c')
0 files changed, 0 insertions, 0 deletions
