mirror of https://github.com/acidanthera/audk.git
df4f154da9
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1563 SnpDxe initializes values for MemoryBarIndex and IoBarIndex to 0 and 1 respectively even if calls to PciIo->GetBarAttributes never return success. Later, if the BAR is used to perform IO/Mem reads/writes, a potentially non-existent BAR index may be accessed. This change initializes the values to an invalid BAR index (PCI_MAX_BAR) so the condition can be explicitly checked to avoid an invalid BAR access. Cc: Siyuan Fu <siyuan.fu@intel.com> Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com> Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com> |
||
---|---|---|
.. | ||
Callback.c | ||
ComponentName.c | ||
Get_status.c | ||
Initialize.c | ||
Mcast_ip_to_mac.c | ||
Nvdata.c | ||
Receive.c | ||
Receive_filters.c | ||
Reset.c | ||
Shutdown.c | ||
Snp.c | ||
Snp.h | ||
SnpDxe.inf | ||
SnpDxe.uni | ||
SnpDxeExtra.uni | ||
Start.c | ||
Station_address.c | ||
Statistics.c | ||
Stop.c | ||
Transmit.c | ||
WaitForPacket.c |