From: Daniel KouĊ™il Date: Tue, 15 Jul 2008 10:18:06 +0000 (+0000) Subject: don't access unallocated memory X-Git-Tag: glite-security-proxyrenewal_R_1_3_6_1~1 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=b3cb5a4ea1932dd6be995eeaa49c3d67133db832;p=jra1mw.git don't access unallocated memory --- 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);