From: Adam Dickmeiss Date: Tue, 16 Aug 2011 08:27:20 +0000 (+0200) Subject: Check for invalid COMSTACK addresses X-Git-Tag: v4.2.9~3 X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=commitdiff_plain;h=d1f18e923658fe9817fbda7b510ae40e9be69e7f 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). --- 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) {