From: Daniel KouĊ™il Date: Tue, 24 Jun 2008 14:20:42 +0000 (+0000) Subject: avoid accessing uninitialized memory X-Git-Tag: merge_313_5_dst~1 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=1bb6ed556dc3448d0a1f4f2201d6330717b48af7;p=jra1mw.git avoid accessing uninitialized memory --- diff --git a/org.glite.lb.client/src/prod_proto.c b/org.glite.lb.client/src/prod_proto.c index 1a2a3f8..4a129c9 100644 --- a/org.glite.lb.client/src/prod_proto.c +++ b/org.glite.lb.client/src/prod_proto.c @@ -254,7 +254,8 @@ int edg_wll_log_connect(edg_wll_Context ctx, int *conn) edg_wll_SetErrorGss(ctx, "edg_wll_gss_acquire_cred_gsi(): failed to load GSI credentials", &gss_stat); goto edg_wll_log_connect_err; } - my_subject_name = ctx->connections->connPool[index].gsiCred->name; + if (ctx->connections->connPool[index].gsiCred) + my_subject_name = ctx->connections->connPool[index].gsiCred->name; #ifdef EDG_WLL_LOG_STUB if (my_subject_name != NULL) { @@ -282,7 +283,8 @@ int edg_wll_log_connect(edg_wll_Context ctx, int *conn) answer = edg_wll_SetErrorGss(ctx, "edg_wll_gss_acquire_cred_gsi(): failed to load GSI credentials", &gss_stat); goto edg_wll_log_connect_err; } - my_subject_name = ctx->connections->connPool[index].gsiCred->name; + if (ctx->connections->connPool[index].gsiCred) + my_subject_name = ctx->connections->connPool[index].gsiCred->name; #ifdef EDG_WLL_LOG_STUB if (my_subject_name != NULL) {