Re: [PATCH 3/4] lib/vsprintf: use int for field_width in vsscanf()

Andy Shevchenko
2026-03-25T12:00:27Z

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