On 01/04/2025 2:08 pm, Roger Pau Monne wrote: > The base address is in the pe32_opt_hdr, not after it. > > Previous to commit f7f42accbbbb the base was read standalone (as the first
This is slightly awkward grammar. "Prior to commit" is the more normal phrasing. > field of pe32_opt_hdr). However with the addition of reading the full > contents of pe32_opt_hdr, such read will also fetch the base. The current > attempt to read the base after pe32_opt_hdr is bogus, and could only work > if the file cursor is repositioned using lseek(), but there's no need for > that as the data is already fetched in pe32_opt_hdr. > > Fixes: f7f42accbbbb ('x86/efi: Use generic PE/COFF structures') > Signed-off-by: Roger Pau Monné <roger....@citrix.com> Reviewed-by: Andrew Cooper <andrew.coop...@citrix.com>