diff options
author | Dan Campbell <dan@ws0w.com> | 2019-04-04 15:15:33 -0600 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2019-04-08 11:03:36 +1000 |
commit | d7af859880c14fff9d46a028366ab473977d1f36 (patch) | |
tree | 6fffb672bb56f0603c5e413019ec8d9b9e8688a4 /apps | |
parent | 8851d3728725885d06db2ff4ef5e5ea3a080deef (diff) |
s_client starttls: fix handling of multiline reply
Fixes #8645
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/8654)
(cherry picked from commit f997e456b9bd43af275aab90c727a52287467e98)
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 4dd6e2fef4..b85339a0b8 100644 --- a/apps/s_client.c +++ b/apps/s_client.c @@ -2253,7 +2253,7 @@ int s_client_main(int argc, char **argv) do { mbuf_len = BIO_gets(fbio, mbuf, BUFSIZZ); } - while (mbuf_len > 3 && mbuf[3] == '-'); + while (mbuf_len > 3 && (!isdigit(mbuf[0]) || !isdigit(mbuf[1]) || !isdigit(mbuf[2]) || mbuf[3] != ' ')); (void)BIO_flush(fbio); BIO_pop(fbio); BIO_free(fbio); |