[coreboot] NULL pointer dereference in search_bus_device()

Sven Schnelle svens at stackframe.org
Mon Jan 10 14:29:06 CET 2011


Sven Schnelle <svens at stackframe.org> writes:

Missed a bracket, sorry:

if (res->flags & IORESOURCE_SUBTRACTIVE) {
      struct bus * subbus;
    for (subbus = curdev->link_list; subbus; subbus = subbus->next) {
                 if (subbus->link_num == IOINDEX_SUBTRACTIVE_LINK(res->index)) {
                     search_bus_resources(subbus, type_mask, type, search, gp);
                     break;
                 }
    }
        continue;
}

> it should be proably something like:
> -----------------------8<-------------------
>
> if (res->flags & IORESOURCE_SUBTRACTIVE) {
>     struct bus * subbus;
>     for (subbus = curdev->link_list; subbus; subbus = subbus->next) {
>                 if (subbus->link_num == IOINDEX_SUBTRACTIVE_LINK(res->index))
>                     search_bus_resources(subbus, type_mask, type, search, gp);
>                  break;
>     }
>        continue;
> }
> -----------------------8<-------------------
>
> Regards,
>
> Sven.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20110110/eb8737a8/attachment.sig>


More information about the coreboot mailing list