[coreboot] NULL pointer dereference in search_bus_device()
Myles Watson
mylesgw at gmail.com
Mon Jan 10 14:20:45 CET 2011
> diff --git a/src/devices/device_util.c b/src/devices/device_util.c
> index 9081a36..d761cba 100644
> --- a/src/devices/device_util.c
> +++ b/src/devices/device_util.c
> @@ -583,8 +583,9 @@ void search_bus_resources(struct bus *bus, unsigned
> long type_mask,
> if (subbus->link_num
> ==
IOINDEX_SUBTRACTIVE_LINK(res->index))
> break;
> - search_bus_resources(subbus, type_mask,
type,
> - search, gp);
> + if (subbus)
> + search_bus_resources(subbus,
type_mask,
> type,
> + search, gp);
> continue;
> }
> search(gp, curdev, res);
If subbus is NULL, then accessing subbus->link_num is also a problem.
Thanks,
Myles
More information about the coreboot
mailing list