summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Brown <mbrown@fensystems.co.uk>2018-03-12 20:31:37 +0000
committerPeter Jones <pjones@redhat.com>2018-03-14 13:44:45 -0400
commit5b6253c98e2d735034e1b482a8742859620fbe92 (patch)
treeedbe58b6732bc919cfc9035bb6e43c2cfbf78090
parent6aa5a62515d62139a2d3b34626fac8910e864a3d (diff)
downloadefi-boot-shim-5b6253c98e2d735034e1b482a8742859620fbe92.tar.gz
efi-boot-shim-5b6253c98e2d735034e1b482a8742859620fbe92.zip
Do not modify original image
relocate_coff() currently modifies the PE header within the raw data. This appears to be unnecessary, and causes a verification failure if a second attempt is made to verify the same data buffer. Signed-off-by: Michael Brown <mbrown@fensystems.co.uk>
-rw-r--r--shim.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/shim.c b/shim.c
index 1cbe4467..bd3df810 100644
--- a/shim.c
+++ b/shim.c
@@ -234,11 +234,6 @@ static EFI_STATUS relocate_coff (PE_COFF_LOADER_IMAGE_CONTEXT *context,
void *ImageEnd = (char *)orig + size;
int n = 0;
- if (image_is_64_bit(context->PEHdr))
- context->PEHdr->Pe32Plus.OptionalHeader.ImageBase = (UINT64)(unsigned long)data;
- else
- context->PEHdr->Pe32.OptionalHeader.ImageBase = (UINT32)(unsigned long)data;
-
/* Alright, so here's how this works:
*
* context->RelocDir gives us two things: