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 /apps | |
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 'apps')
-rw-r--r-- | apps/s_client.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/s_client.c b/apps/s_client.c index f056adb68e..d82b02d192 100644 --- a/apps/s_client.c +++ b/apps/s_client.c @@ -2272,7 +2272,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); |