summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMichael Baentsch <57787676+baentsch@users.noreply.github.com>2023-06-08 08:05:42 +0200
committerTomas Mraz <tomas@openssl.org>2023-06-09 17:32:14 +0200
commit79331b86e6ed0b6f37d3e78e5f47d420dc9677dd (patch)
treeceb5683460c0131bd3cdd255cb34d5b8d9f55817 /test
parent0ffe629a7f57424a460a05b7064a374835b1c279 (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.c4
-rw-r--r--test/testutil/provider.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/test/evp_test.c b/test/evp_test.c
index 5d0a4ad944..04b5d1b634 100644
--- a/test/evp_test.c
+++ b/test/evp_test.c
@@ -3723,11 +3723,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;