summaryrefslogtreecommitdiff
path: root/shim.c
diff options
context:
space:
mode:
authorPeter Jones <pjones@redhat.com>2016-09-09 12:05:02 -0400
committerPeter Jones <pjones@redhat.com>2016-09-09 12:07:26 -0400
commitaf13b3efc9d3ca45c1edf8c08164cba1cf7f639f (patch)
treeb0b66708122885abd9e2cf18d8518fec6b1b67e7 /shim.c
parent2de084689fd013ade4d3cc3d8efa7a8c55104241 (diff)
downloadefi-boot-shim-af13b3efc9d3ca45c1edf8c08164cba1cf7f639f.tar.gz
efi-boot-shim-af13b3efc9d3ca45c1edf8c08164cba1cf7f639f.zip
Fix up a merge error in 467878f3e0.
In the branch I wrote the code on, "size" was a thing. On this branch it isn't. Signed-off-by: Peter Jones <pjones@redhat.com>
Diffstat (limited to 'shim.c')
-rw-r--r--shim.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/shim.c b/shim.c
index f743e8e2..533f5aa5 100644
--- a/shim.c
+++ b/shim.c
@@ -1293,10 +1293,12 @@ static EFI_STATUS handle_image (void *data, unsigned int datasize,
}
if (Section->SizeOfRawData > 0)
- CopyMem(base, data + Section->PointerToRawData, size);
+ CopyMem(base, data + Section->PointerToRawData,
+ Section->SizeOfRawData);
- if (size < Section->Misc.VirtualSize)
- ZeroMem(base + size, Section->Misc.VirtualSize - size);
+ if (Section->SizeOfRawData < Section->Misc.VirtualSize)
+ ZeroMem(base + Section->SizeOfRawData,
+ Section->Misc.VirtualSize - Section->SizeOfRawData);
}
}