avoid crash if hostserv is with host part only

(if priority is set to host)

Signed-off-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
Roumen Petrov 2016-02-06 14:07:39 +02:00 committed by Richard Levitte
parent 895ffe41c2
commit 8092650298

View File

@ -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) {