From d1f18e923658fe9817fbda7b510ae40e9be69e7f Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 16 Aug 2011 10:27:20 +0200 Subject: [PATCH] Check for invalid COMSTACK addresses Check return value of cs_parse_host in cs_create_host_proxy. For example, yaz-url would SEGV if ssl/https was given and SSL was not enabled in the built (as it happens on Windows). --- src/comstack.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/comstack.c b/src/comstack.c index b81e89c..74faf5c 100644 --- a/src/comstack.c +++ b/src/comstack.c @@ -169,7 +169,8 @@ COMSTACK cs_create_host_proxy(const char *vhost, int blocking, void **vp, CS_TYPE t; char *connect_host = 0; - cs_parse_host(vhost, &host, &t, &proto, &connect_host); + if (!cs_parse_host(vhost, &host, &t, &proto, &connect_host)) + return 0; if (t == tcpip_type) { -- 1.7.10.4