diff options
author | Michael Baentsch <57787676+baentsch@users.noreply.github.com> | 2023-06-08 08:05:42 +0200 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2023-06-09 17:30:28 +0200 |
commit | 8a2e74d0536c91585fbe789e0ab7b06cab0289c2 (patch) | |
tree | c744f66c5592e44c5087536cef2e95141c132ba6 /test | |
parent | 0ef024a492212b6cac30d62485a3b29632af2ee2 (diff) |
Cast the argument to unsigned char when calling isspace()
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21151)
Diffstat (limited to 'test')
-rw-r--r-- | test/evp_test.c | 4 | ||||
-rw-r--r-- | test/testutil/provider.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/test/evp_test.c b/test/evp_test.c index b783ab7ddf..19efa95901 100644 --- a/test/evp_test.c +++ b/test/evp_test.c @@ -3811,11 +3811,11 @@ static int prov_available(char *providers) int more = 1; while (more) { - for (; isspace(*providers); providers++) + for (; isspace((unsigned char)(*providers)); providers++) continue; if (*providers == '\0') break; /* End of the road */ - for (p = providers; *p != '\0' && !isspace(*p); p++) + for (p = providers; *p != '\0' && !isspace((unsigned char)(*p)); p++) continue; if (*p == '\0') more = 0; diff --git a/test/testutil/provider.c b/test/testutil/provider.c index a40a72c929..30c757c5c1 100644 --- a/test/testutil/provider.c +++ b/test/testutil/provider.c @@ -177,11 +177,11 @@ int fips_provider_version_match(OSSL_LIB_CTX *libctx, const char *versions) } mode; while (*versions != '\0') { - for (; isspace(*versions); versions++) + for (; isspace((unsigned char)(*versions)); versions++) continue; if (*versions == '\0') break; - for (p = versions; *versions != '\0' && !isspace(*versions); versions++) + for (p = versions; *versions != '\0' && !isspace((unsigned char)(*versions)); versions++) continue; if (*p == '!') { mode = MODE_NE; |