From: Roumen Petrov Date: Sat, 6 Feb 2016 12:07:39 +0000 (+0200) Subject: avoid crash if hostserv is with host part only X-Git-Tag: OpenSSL_1_1_0-pre3~214 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=80926502986a97eed53afe1d85fc074e40829547;p=oweals%2Fopenssl.git avoid crash if hostserv is with host part only (if priority is set to host) Signed-off-by: Richard Levitte Reviewed-by: Andy Polyakov Reviewed-by: Rich Salz --- diff --git a/crypto/bio/b_addr.c b/crypto/bio/b_addr.c index f1ff5fe37c..a2a0dd2647 100644 --- a/crypto/bio/b_addr.c +++ b/crypto/bio/b_addr.c @@ -505,7 +505,7 @@ int BIO_parse_hostserv(const char *hostserv, char **host, char **service, } } - if (strchr(p, ':')) + if (p != NULL && strchr(p, ':')) goto spec_err; if (h != NULL && host != NULL) {