diff options
| author | Peter Jones <pjones@redhat.com> | 2017-09-27 13:05:16 -0400 |
|---|---|---|
| committer | Peter Jones <pmjones@gmail.com> | 2018-03-12 16:21:43 -0400 |
| commit | 05458d227ff88e12397fc1226b48d5f59c368b31 (patch) | |
| tree | 384c2e8dd89bf78f38fa8f0606e7007b1001044a /lib/variables.c | |
| parent | 933bb4f776d117f6e8684bdc24b5130ff85ab1a9 (diff) | |
| download | efi-boot-shim-05458d227ff88e12397fc1226b48d5f59c368b31.tar.gz efi-boot-shim-05458d227ff88e12397fc1226b48d5f59c368b31.zip | |
fallback: handle buffer allocations for fh->GetInfo() prettier.
At all the places we use fh->GetInfo, covscan can't tell that
fh->GetInfo() will return EFI_BUFFER_TOO_SMALL and we'll allocate on the
first try.
If we just explicitly check for "buffer == NULL" as well, covscan
believes we're doing work we don't need to (which is true!)
So instead, put an rc test to return error for everything else there, so
the allocation isn't in a conditional.
Yet another stupid one, but it's easier to nerf it this way than write
the false-positive rule, and it also hardens against incorrect UEFI
implementations (though we've not seen any yet with the problem this
avoids).
Signed-off-by: Peter Jones <pjones@redhat.com>
Diffstat (limited to 'lib/variables.c')
0 files changed, 0 insertions, 0 deletions
