Fix segfault when trying alternative addresses without timeout.
authorFrantišek Dvořák <valtri@civ.zcu.cz>
Sat, 19 Nov 2011 11:36:04 +0000 (11:36 +0000)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Sat, 19 Nov 2011 11:36:04 +0000 (11:36 +0000)
org.glite.lbjp-common.gss/src/glite_gss.c

index 7fada9d..857dbab 100644 (file)
@@ -693,7 +693,7 @@ edg_wll_gss_connect(edg_wll_GssCred cred, char const *hostname, int port,
                                        ar.ent->h_addrtype, port, timeout, connection, gss_code);
                if (ret == 0)
                        goto end;
-               if (timeout->tv_sec < 0 ||(timeout->tv_sec == 0 && timeout->tv_usec <= 0))
+               if (timeout && (timeout->tv_sec < 0 ||(timeout->tv_sec == 0 && timeout->tv_usec <= 0)))
                        goto end;
                i++;
        }