[PATCH v2] xilinx: versal: Fix snprintf invalid size argument
Michal Simek
michal.simek at amd.com
Thu Jul 2 19:12:18 CEST 2026
On 7/2/26 17:28, Francois Berder wrote:
> Hello Michal,
>
>
> On 7/2/26 16:40, Michal Simek wrote:
>>
>>
>> On 7/2/26 15:54, Francois Berder wrote:
>>> buf is an array of size DFU_ALT_BUF_LEN bytes.
>>> It is gradually filled with data using snprintf but the
>>> size argument to snprintf is kept at DFU_ALT_BUF_LEN,
>>> making it possible to overflow the buffer.
>>> Fix this bug using the correct buffer size:
>>> DFU_ALT_BUF_LEN - len.
>>> Also, replace snprintf by scnprintf, otherwise len
>>> variable is incremented incorrectly. It is now
>>> incremented by the actual character count written
>>> in buf.
>>> v2: Replace snprintf by scnprintf
>>
>> this should be below --- not to be the part of commit message.
>>
>> M
>
> Do you mean the last line v2: Replace snprintf by scnprintf ?
>
> Francois
I meant version changelog shouldn't be the part of commit message.
M
More information about the U-Boot
mailing list