Branch: refs/heads/master
  Home:   https://github.com/tianocore/edk2
  Commit: 0b09397dfa0123b9a27c2c52fd2ddafd7a902137
      
https://github.com/tianocore/edk2/commit/0b09397dfa0123b9a27c2c52fd2ddafd7a902137
  Author: Patrick Rudolph <[email protected]>
  Date:   2024-01-22 (Mon, 22 Jan 2024)

  Changed paths:
    M UefiPayloadPkg/Library/CbParseLib/CbParseLib.c

  Log Message:
  -----------
  UefiPayloadPkg: CbParseLib: Fix integer overflow

The IMD entry uses the 32bit start field as relative offset
to root. On Ia32X64 this works fine as UINTN is also 32 bit and
negative relative offsets are properly calculated due to an
integer overflow.

On X64 this doesn't work as UINTN is 64 bit and the offset
is no longer subtracted, but it's added to the root. Fix that
by sign extending the start field to 64 bit.

Test: Booting UefiPayloadPkg still works on Ia32X64 and now also
      works on X64.

Signed-off-by: Patrick Rudolph <[email protected]>
Reviewed-by: Gua Guo <[email protected]>
Reviewed-by: Sean Rhodes <[email protected]>




_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to