diff options
author | Andy Shevchenko <[email protected]> | 2023-03-27 17:27:21 +0300 |
---|---|---|
committer | Petr Mladek <[email protected]> | 2023-04-03 10:51:25 +0200 |
commit | 48e1a66fecb4e8b64cf2a0a8978c048990181d94 (patch) | |
tree | 81703688472c9e299bad0d38f1899ce70a5fed48 | |
parent | 0c705be9609931920c299e76811b21acc9502f1a (diff) |
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 <[email protected]>
Reviewed-by: Sergey Senozhatsky <[email protected]>
Reviewed-by: Petr Mladek <[email protected]>
Signed-off-by: Petr Mladek <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
-rw-r--r-- | lib/vsprintf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/vsprintf.c b/lib/vsprintf.c index be71a03c936a..426418253fd4 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -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; |