[U-Boot] [PATCH v2 09/12] fdtdec: Fix possible infinite loop in fdtdec_get_pci_vendev()

Simon Glass sjg at chromium.org
Sun Aug 23 23:22:12 CEST 2015


On 21 August 2015 at 17:27, Simon Glass <sjg at chromium.org> wrote:
> On 20 August 2015 at 07:40, Bin Meng <bmeng.cn at gmail.com> wrote:
>> When there is no valid compatible string in current list,
>> we should advance to next one in the compatible string list.
>>
>> Signed-off-by: Bin Meng <bmeng.cn at gmail.com>
>> ---
>>
>> Changes in v2: None
>>
>>  lib/fdtdec.c | 3 +--
>>  1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/lib/fdtdec.c b/lib/fdtdec.c
>> index d21fb74..39268a2 100644
>> --- a/lib/fdtdec.c
>> +++ b/lib/fdtdec.c
>> @@ -207,9 +207,8 @@ int fdtdec_get_pci_vendev(const void *blob, int node, u16 *vendor, u16 *device)
>>
>>                                 return 0;
>>                         }
>> -               } else {
>> -                       list += (len + 1);
>>                 }
>> +               list += (len + 1);
>>         }
>>
>>         return -ENOENT;
>> --
>> 1.8.2.1
>>
>
> Acked-by: Simon Glass <sjg at chromium.org>

Applied to u-boot-x86, thanks!


More information about the U-Boot mailing list