mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 13:41:51 +00:00
lib/vsprintf: Use isodigit() for the octal number check
Use isodigit() to test the octal number instead of homegrown approach. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org> Reviewed-by: Petr Mladek <pmladek@suse.com> Signed-off-by: Petr Mladek <pmladek@suse.com> Link: https://lore.kernel.org/r/20230327142721.48378-1-andriy.shevchenko@linux.intel.com
This commit is contained in:
parent
0c705be960
commit
48e1a66fec
@ -3621,7 +3621,7 @@ int vsscanf(const char *buf, const char *fmt, va_list args)
|
||||
if (!digit
|
||||
|| (base == 16 && !isxdigit(digit))
|
||||
|| (base == 10 && !isdigit(digit))
|
||||
|| (base == 8 && (!isdigit(digit) || digit > '7'))
|
||||
|| (base == 8 && !isodigit(digit))
|
||||
|| (base == 0 && !isdigit(digit)))
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user