diff options
| author | Peter Jones <pjones@redhat.com> | 2017-07-24 14:02:37 -0400 |
|---|---|---|
| committer | Peter Jones <pjones@redhat.com> | 2017-07-24 14:02:37 -0400 |
| commit | d89b722ef7059b81a480419ba7b81f1143f085e5 (patch) | |
| tree | a9ac4cfa49e1034aac01c0990e8f86a13768f063 /Cryptlib/OpenSSL/crypto/x509v3/v3_pku.c | |
| parent | c4aa058c2b39f01a4b4486e0a8ae8122f6508d2c (diff) | |
| download | efi-boot-shim-d89b722ef7059b81a480419ba7b81f1143f085e5.tar.gz efi-boot-shim-d89b722ef7059b81a480419ba7b81f1143f085e5.zip | |
Exit our dir->Read() loop if it says there's 0 bytes of data to read.
When dir->Read() says bs=0, we shouldn't try to allocate a buffer and
read into it. On edk2 this works because there's an implicit (possibly
accidental) minimum size of one pool list entry that can be allocated,
so you wind up getting (I think) 8 bytes.
When Rob Clark tried to run this under uboot's emulated UEFI
environment, dir->Read() returned 0 and when we passed that to
AllocateZeroPool() less good things happened.
So just check for that case and exit appropriately.
Signed-off-by: Peter Jones <pjones@redhat.com>
Diffstat (limited to 'Cryptlib/OpenSSL/crypto/x509v3/v3_pku.c')
0 files changed, 0 insertions, 0 deletions
