Re: [PATCH v8 RESEND 1/4] lib: vsprintf: scanf: Negative number must have field width > 1

From: Petr Mladek
Date: Thu May 20 2021 - 04:35:47 EST


On Fri 2021-05-14 17:12:03, Richard Fitzgerald wrote:
> If a signed number field starts with a '-' the field width must be > 1,
> or unlimited, to allow at least one digit after the '-'.
>
> This patch adds a check for this. If a signed field starts with '-'
> and field_width == 1 the scanf will quit.
>
> It is ok for a signed number field to have a field width of 1 if it
> starts with a digit. In that case the single digit can be converted.
>
> Signed-off-by: Richard Fitzgerald <rf@xxxxxxxxxxxxxxxxxxxxx>
> Reviewed-by: Petr Mladek <pmladek@xxxxxxxx>
> Acked-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>

The entrire patchset has been committed into print/linux.git,
branch for-5.14-vsprintf-scanf.

Thanks for reminder. I am sorry. It somehow fallen from my radar.

Best Regards,
Petr