commit | 445ec321e71b3124abacfb358f72ac6a70d87602 | [log] [tgz] |
---|---|---|
author | Rex Zhu <Rex.Zhu@amd.com> | Tue Jun 05 09:46:45 2018 +0800 |
committer | Bjorn Helgaas <bhelgaas@google.com> | Fri Jun 29 21:07:17 2018 -0500 |
tree | acbecd71b968ec0667bcebed2652d5111edc8e5e | |
parent | 11eb0e0e8dea8b97cff972b09cf6fb033b729dff [diff] |
PCI: Avoid accessing memory outside the ROM BAR pci_get_rom_size() accepts the base and size of the ROM BAR as arguments. The byte at "rom + size" is the first byte *past* the ROM, so change ">" to ">=" to avoid accessing beyond the actual length of the ROM BAR. Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> [bhelgaas: changelog] Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>