From 80926502986a97eed53afe1d85fc074e40829547 Mon Sep 17 00:00:00 2001 From: Roumen Petrov Date: Sat, 6 Feb 2016 14:07:39 +0200 Subject: [PATCH] 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 --- crypto/bio/b_addr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 2.34.1