From: Aleš Křenek Date: Fri, 10 Oct 2008 12:42:13 +0000 (+0000) Subject: don't coredump on emtpy lists X-Git-Tag: test_tag~145 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=70b73f3ab1653f06c847a03f8ffac83172138648;p=jra1mw.git don't coredump on emtpy lists --- diff --git a/org.glite.lb.server/src/lb_html.c b/org.glite.lb.server/src/lb_html.c index ccb4ab4..d4bdb1f 100644 --- a/org.glite.lb.server/src/lb_html.c +++ b/org.glite.lb.server/src/lb_html.c @@ -58,7 +58,7 @@ int edg_wll_UserInfoToHTML(edg_wll_Context ctx UNUSED_VAR, edg_wlc_JobId *jobsOu /* head */ pomB = strdup(""); - while (jobsOut[i]) { + while (jobsOut && jobsOut[i]) { char *chid = edg_wlc_JobIdUnparse(jobsOut[i]); asprintf(&pomA,"%s\t\t
  • %s\r\n", @@ -74,7 +74,7 @@ int edg_wll_UserInfoToHTML(edg_wll_Context ctx UNUSED_VAR, edg_wlc_JobId *jobsOu pomD = strdup(""); i = 0; - while(notifids[i]){ + while(notifids && notifids[i]){ asprintf(&pomC, "%s\t\t
  • %s\r\n", pomD, notifids[i],