Re: [PATCH 3/4] lib/vsprintf: use int for field_width in vsscanf()
From: Andy Shevchenko
Date: Wed Mar 25 2026 - 08:05:26 EST
On Tue, Mar 24, 2026 at 10:49:39PM +0000, Josh Law wrote:
> vsscanf() declares field_width as s16 but assigns it from skip_atoi()
> which returns int. Values above 32767 silently truncate to negative,
> causing vsscanf() to abort all remaining parsing. This is inconsistent
> with struct printf_spec which uses int for field_width.
Is the field_width an acceptable integer range by the specifications?
--
With Best Regards,
Andy Shevchenko