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@opensource.cirrus.com Reviewed-by: Petr Mladek pmladek@suse.com Acked-by: Andy Shevchenko andriy.shevchenko@linux.intel.com
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