[PATCH] cmd: ufetch: Initialise size before first use

Andrew Goodbody andrew.goodbody at linaro.org
Mon Jul 28 11:02:10 CEST 2025


Thanks Casey. It is just that this patch still shows as 'New' in 
patchwork rather than 'Accepted'.

Andrew

On 25/07/2025 14:19, Casey Connolly wrote:
> Hi Andrew,
> 
> Sorry I missed the thank you letter for this one. This patch was picked
> as 8830e72092e0
> 
> Kind regards,
> 
> On 24/07/2025 10:59, Andrew Goodbody wrote:
>> ping?
>>
>> On 26/06/2025 15:12, Andrew Goodbody wrote:
>>> The local variable size is not assigned to before it is used
>>> for the first time. Correct this.
>>>
>>> This issue was found by Smatch.
>>>
>>> Fixes: 86d462c05d57 (cmd: add a fetch utility)
>>> Signed-off-by: Andrew Goodbody <andrew.goodbody at linaro.org>
>>> ---
>>>    cmd/ufetch.c | 2 +-
>>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/cmd/ufetch.c b/cmd/ufetch.c
>>> index 46bd16824e6..bc5db08eee1 100644
>>> --- a/cmd/ufetch.c
>>> +++ b/cmd/ufetch.c
>>> @@ -93,7 +93,7 @@ static int do_ufetch(struct cmd_tbl *cmdtp, int
>>> flag, int argc,
>>>        const char *model, *compatible;
>>>        char *ipaddr;
>>>        int n_cmds, n_cpus = 0, compatlen;
>>> -    size_t size;
>>> +    size_t size = 0;
>>>        ofnode np;
>>>        bool skip_ascii = false;
>>>   
>>> ---
>>> base-commit: 903eb123236ccbd8ef05d43507a2a910b785bd56
>>> change-id: 20250626-ufetch_fix-54b741710142
>>>
>>> Best regards,
>>
> 



More information about the U-Boot mailing list