diff options
| -rw-r--r-- | shim.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -1347,6 +1347,11 @@ static EFI_STATUS handle_image (void *data, unsigned int datasize, */ Section = context.FirstSection; for (i = 0; i < context.NumberOfSections; i++, Section++) { + /* Don't try to copy discardable sections with zero size */ + if ((Section->Characteristics & EFI_IMAGE_SCN_MEM_DISCARDABLE) && + !Section->Misc.VirtualSize) + continue; + base = ImageAddress (buffer, context.ImageSize, Section->VirtualAddress); end = ImageAddress (buffer, context.ImageSize, |
