From 70b73f3ab1653f06c847a03f8ffac83172138648 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ale=C5=A1=20K=C5=99enek?= Date: Fri, 10 Oct 2008 12:42:13 +0000 Subject: [PATCH] don't coredump on emtpy lists --- org.glite.lb.server/src/lb_html.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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], -- 1.8.2.3