summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorMichael Baentsch <57787676+baentsch@users.noreply.github.com>2023-06-05 13:09:29 +0200
committerTomas Mraz <tomas@openssl.org>2023-06-06 15:51:21 +0200
commit3fbb364b192c3568947d5e164cc29ebe6f992205 (patch)
treee8167e75b105b828b7511342fa1fc2c2d9f4b64f /apps
parent560208fb9746d32fc0e5d29dea2a51eb3339a1c9 (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 'apps')
-rw-r--r--apps/s_client.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/s_client.c b/apps/s_client.c
index a914238642..8ddbd154fc 100644
--- a/apps/s_client.c
+++ b/apps/s_client.c
@@ -2271,7 +2271,7 @@ int s_client_main(int argc, char **argv)
do {
mbuf_len = BIO_gets(fbio, mbuf, BUFSIZZ);
}
- while (mbuf_len > 3 && (!isdigit(mbuf[0]) || !isdigit(mbuf[1]) || !isdigit(mbuf[2]) || mbuf[3] != ' '));
+ while (mbuf_len > 3 && (!isdigit((unsigned char)mbuf[0]) || !isdigit((unsigned char)mbuf[1]) || !isdigit((unsigned char)mbuf[2]) || mbuf[3] != ' '));
(void)BIO_flush(fbio);
BIO_pop(fbio);
BIO_free(fbio);