Skip to content

Commit

Permalink
s_client starttls: fix handling of multiline reply
Browse files Browse the repository at this point in the history
Fixes openssl#8645

Reviewed-by: Paul Dale <[email protected]>
Reviewed-by: Matthias St. Pierre <[email protected]>
Reviewed-by: Matt Caswell <[email protected]>
(Merged from openssl#8654)
  • Loading branch information
ws0w authored and paulidale committed Apr 8, 2019
1 parent df09b6b commit f997e45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/s_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -2277,7 +2277,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);
Expand Down

0 comments on commit f997e45

Please sign in to comment.