summaryrefslogtreecommitdiff
path: root/fallback.c
diff options
context:
space:
mode:
Diffstat (limited to 'fallback.c')
-rw-r--r--fallback.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fallback.c b/fallback.c
index 5e4a3963..81f5303a 100644
--- a/fallback.c
+++ b/fallback.c
@@ -591,6 +591,10 @@ find_boot_csv(EFI_FILE_HANDLE fh, CHAR16 *dirname)
FreePool(buffer);
return rc;
}
+ /* If there's no data to read, don't try to allocate 0 bytes
+ * and read the data... */
+ if (bs == 0)
+ break;
buffer = AllocateZeroPool(bs);
if (!buffer) {