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:33:04 +0200 |
commit | fefeecf00dd75a44dc33569f857aa741f59ccbb4 (patch) | |
tree | 733d11752f1308c314941cef1ef1c4c64f630307 /test | |
parent | 3fbb364b192c3568947d5e164cc29ebe6f992205 (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)
(cherry picked from commit 8a2e74d0536c91585fbe789e0ab7b06cab0289c2)
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 19cabd6dce..efc6709673 100644 --- a/test/evp_test.c +++ b/test/evp_test.c @@ -3683,11 +3683,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 3f94d7506e..79ae13b42a 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; |