From b3cb5a4ea1932dd6be995eeaa49c3d67133db832 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Daniel=20Kou=C5=99il?= Date: Tue, 15 Jul 2008 10:18:06 +0000 Subject: [PATCH] don't access unallocated memory --- org.glite.security.proxyrenewal/src/voms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.glite.security.proxyrenewal/src/voms.c b/org.glite.security.proxyrenewal/src/voms.c index 367c4de..c8f2486 100644 --- a/org.glite.security.proxyrenewal/src/voms.c +++ b/org.glite.security.proxyrenewal/src/voms.c @@ -133,7 +133,7 @@ create_voms_command(glite_renewal_core_context ctx, struct vomsdata *vd, struct attribs = (*voms_cert)->std; - if (strcmp (attribs[0]->role, "NULL") == 0 ) + if (attribs[0]->role == NULL || strcmp (attribs[0]->role, "NULL") == 0 ) ret = asprintf(command, "G%s", attribs[0]->group); else ret = asprintf(command, "B%s:%s", attribs[0]->group, attribs[0]->role); -- 1.8.2.3