Re: [PATCH v2 1/2] lib/vsprintf: always advance args in bstr_printf() pointer path

From: Krzysztof Kozlowski

Date: Tue Mar 31 2026 - 03:33:15 EST


On 30/03/2026 21:34, Josh Law wrote:
> When the output buffer is full (str >= end), bstr_printf() skips
> advancing the args pointer past the pre-rendered pointer string in
> bin_buf. This causes all subsequent format specifiers to read from
> the wrong position, corrupting the rest of the output.
>
> Always compute the string length and advance args regardless of
> whether there is space to copy into the output buffer.
>
> Signed-off-by: Josh Law <objecting@xxxxxxxxxxxxx>

NAK

Questionably origin (multiple identities used), questionable content.

Best regards,
Krzysztof