diff options
| author | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2021-08-29 18:46:37 +0200 |
|---|---|---|
| committer | Robbie Harwood <rharwood@redhat.com> | 2021-09-03 09:46:30 -0400 |
| commit | c5784078a9078c0c2171aa42b458f34b2b175c74 (patch) | |
| tree | a7d40b9f6ac6c69bde242fffcd2735aeb21a5109 /fallback.c | |
| parent | 204f6bb5ba94061c8d0c60a6969fb263aadfce2d (diff) | |
| download | efi-boot-shim-c5784078a9078c0c2171aa42b458f34b2b175c74.tar.gz efi-boot-shim-c5784078a9078c0c2171aa42b458f34b2b175c74.zip | |
fallback: incorrect check after AllocateZeroPool()
After calling AllocateZeroPool() we must check the returned pointer.
Fixes: 3ce517fdbb4e ("Add a fallback loader for when shim is invoked as BOOTX64.EFI")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Diffstat (limited to 'fallback.c')
| -rw-r--r-- | fallback.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -158,7 +158,7 @@ read_file(EFI_FILE_HANDLE fh, CHAR16 *fullpath, CHAR16 **buffer, UINT64 *bs) } b = AllocateZeroPool(len + 2); - if (!buffer) { + if (!b) { console_print(L"Could not allocate memory\n"); fh2->Close(fh2); return EFI_OUT_OF_RESOURCES; |
