Fix segfault when trying alternative addresses without timeout (lost patch during...
authorFrantišek Dvořák <valtri@civ.zcu.cz>
Thu, 23 Feb 2012 09:58:25 +0000 (09:58 +0000)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Thu, 23 Feb 2012 09:58:25 +0000 (09:58 +0000)
org.glite.lbjp-common.gss/src/glite_gss.c

index b7cf7c5..9f9a48f 100644 (file)
@@ -894,7 +894,7 @@ 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;
                k++;
            } while (mechs != GSS_C_NO_OID_SET && k < mechs->count);