[PATCH] power: pfuze100: Ensure loop index is incremented

Andrew Goodbody andrew.goodbody at linaro.org
Thu Aug 7 17:04:09 CEST 2025


On 14/07/2025 13:25, Quentin Schulz wrote:
> Hi Andrew,
> 
> On 7/3/25 1:31 PM, Andrew Goodbody wrote:
>> The for loop in se_desc uses i as the loop index and also to cause the
>> loop to end if the passed in name is not found. However i is not
>> incremented which could cause the loop to continue indefinitely and
>> access out of bounds memory.
>> Add an increment of i to ensure that the loop terminates correctly in
>> the case where name is not found.
>>
>> This issue found by Smatch.
>>
>> Signed-off-by: Andrew Goodbody <andrew.goodbody at linaro.org>
> 
> Reviewed-by: Quentin Schulz <quentin.schulz at cherry.de>
> 
> Thanks!
> Quentin

Is there anything else needed before this can be merged please?

Thanks,
Andrew


More information about the U-Boot mailing list