diff options
author | Michael Baentsch <57787676+baentsch@users.noreply.github.com> | 2023-06-05 13:09:29 +0200 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2023-06-06 15:50:37 +0200 |
commit | 0ffe629a7f57424a460a05b7064a374835b1c279 (patch) | |
tree | 32498f9d596e9db0c59a03f0c0cabac3f45b09f9 /providers | |
parent | 7dec308d1028a1fefea9ac8b89cc2932bcf47829 (diff) |
Cast the argument to unsigned char when calling isdigit()
Fixes #21123
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21127)
(cherry picked from commit 8229874476cc2955e6947cf6d3fee09e13b8c160)
Diffstat (limited to 'providers')
-rw-r--r-- | providers/implementations/storemgmt/file_store.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/providers/implementations/storemgmt/file_store.c b/providers/implementations/storemgmt/file_store.c index 6d6312659b..b5bb1dc92a 100644 --- a/providers/implementations/storemgmt/file_store.c +++ b/providers/implementations/storemgmt/file_store.c @@ -612,9 +612,9 @@ static int file_name_check(struct file_ctx_st *ctx, const char *name) * Last, check that the rest of the extension is a decimal number, at * least one digit long. */ - if (!isdigit(*p)) + if (!isdigit((unsigned char)*p)) return 0; - while (isdigit(*p)) + while (isdigit((unsigned char)*p)) p++; #ifdef __VMS @@ -623,7 +623,7 @@ static int file_name_check(struct file_ctx_st *ctx, const char *name) */ if (*p == ';') for (p++; *p != '\0'; p++) - if (!ossl_isdigit(*p)) + if (!ossl_isdigit((unsigned char)*p)) break; #endif |