From 1bb6ed556dc3448d0a1f4f2201d6330717b48af7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Daniel=20Kou=C5=99il?= Date: Tue, 24 Jun 2008 14:20:42 +0000 Subject: [PATCH] avoid accessing uninitialized memory --- org.glite.lb.client/src/prod_proto.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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) { -- 1.8.2.3