Skip to content

Commit 48e1a66

Browse files
andy-shevpmladek
authored andcommitted
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
1 parent 0c705be commit 48e1a66

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/vsprintf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3621,7 +3621,7 @@ int vsscanf(const char *buf, const char *fmt, va_list args)
36213621
if (!digit
36223622
|| (base == 16 && !isxdigit(digit))
36233623
|| (base == 10 && !isdigit(digit))
3624-
|| (base == 8 && (!isdigit(digit) || digit > '7'))
3624+
|| (base == 8 && !isodigit(digit))
36253625
|| (base == 0 && !isdigit(digit)))
36263626
break;
36273627

0 commit comments

Comments
 (0)