[PATCH] bios: mpdump: fix indexing outside of mpdump_sys_addr_type array
IvanHu
ivan.hu at canonical.com
Thu Jun 20 07:46:34 UTC 2013
On 06/16/2013 02:18 PM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> mpdump_sys_addr_type has 3 elements, so fix the guard check which
> was off by 1.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> src/bios/multiproc/mpdump.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/bios/multiproc/mpdump.c b/src/bios/multiproc/mpdump.c
> index ac6c684..fd2d7a3 100644
> --- a/src/bios/multiproc/mpdump.c
> +++ b/src/bios/multiproc/mpdump.c
> @@ -181,7 +181,7 @@ static void mpdump_dump_sys_addr_entry(fwts_framework *fw, void *data, uint32_t
> fwts_log_info_verbatum(fw, "System Address Space Mapping Entry: (@0x%8.8x)", phys_addr);
> fwts_log_info_verbatum(fw, " Bus ID: 0x%2.2x", sys_addr_entry->bus_id);
> fwts_log_info_verbatum(fw, " Address Type: 0x%2.2x (%s)", sys_addr_entry->address_type,
> - sys_addr_entry->address_type < 4 ? mpdump_sys_addr_type[sys_addr_entry->address_type] : "Unknown");
> + sys_addr_entry->address_type < 3 ? mpdump_sys_addr_type[sys_addr_entry->address_type] : "Unknown");
> fwts_log_info_verbatum(fw, " Address Start: 0x%16.16llx",
> (unsigned long long)sys_addr_entry->address_base);
> fwts_log_info_verbatum(fw, " Address End: 0x%16.16llx",
> @@ -457,7 +457,7 @@ static void mpdump_dump_system_address_table(fwts_framework *fw)
> (unsigned long long)sys_addr_entry->address_base +
> sys_addr_entry->address_length,
> sys_addr_entry->bus_id,
> - sys_addr_entry->address_type < 4 ?
> + sys_addr_entry->address_type < 3 ?
> mpdump_sys_addr_type[sys_addr_entry->address_type] : "Unknown");
> }
>
>
Acked-by: Ivan Hu <ivan.hu at canonical.com>
More information about the fwts-devel
mailing list