Skip to content

Commit

Permalink
Size should minus 1 when calculating 'RelocBaseEnd'
Browse files Browse the repository at this point in the history
Signed-off-by: Dennis Tseng <dennis.tseng@suse.com>
  • Loading branch information
dennis-tseng99 authored and jsetje committed Jul 14, 2023
1 parent e246812 commit 62e4b44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pe-relocate.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ relocate_coff (PE_COFF_LOADER_IMAGE_CONTEXT *context,
/* RelocBaseEnd here is the address of the first entry /past/ the
* table. */
RelocBaseEnd = ImageAddress(orig, size, Section->PointerToRawData +
context->RelocDir->Size);
context->RelocDir->Size - 1);

if (!RelocBase && !RelocBaseEnd)
return EFI_SUCCESS;
Expand Down

0 comments on commit 62e4b44

Please sign in to comment.