efi_loader: Fix relocations above 64kb image size
authorAlexander Graf <agraf@suse.de>
Thu, 18 Aug 2016 21:45:18 +0000 (23:45 +0200)
committerTom Rini <trini@konsulko.com>
Sat, 20 Aug 2016 18:03:27 +0000 (14:03 -0400)
commitb1237c6e8afa3f112128a886faed152e65def3fd
tree7f0b8cf20000d71583e586d59704c3ab5c4e4012
parent68a2fd43578ca2f5a533f253df86f2f688e3b299
efi_loader: Fix relocations above 64kb image size

We were truncating the image offset within the target image to 16 bits
which again meant that we were potentially overwriting random memory
in the lower 16 bits of the image.

This patch casts the offset to a more reasonable 32bits.

With this applied, I can successfully see Shell.efi assert because it
can't find a protocol it expects to be available.

Signed-off-by: Alexander Graf <agraf@suse.de>
lib/efi_loader/efi_image_loader.c