From 4e0c5e29ff9812f26ad58c42a39ce5e7b5dc847c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michal=20Voc=C5=AF?= Date: Tue, 11 Sep 2012 12:50:26 +0000 Subject: [PATCH] more robust tag list parsing --- org.glite.lb.common/src/events_parse.c.T | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/org.glite.lb.common/src/events_parse.c.T b/org.glite.lb.common/src/events_parse.c.T index fab9e78..5704892 100644 --- a/org.glite.lb.common/src/events_parse.c.T +++ b/org.glite.lb.common/src/events_parse.c.T @@ -59,7 +59,7 @@ int edg_wll_TagListParse(const char *src, edg_wll_TagValue **list) { if(NULL == *list) return -1; - for(p = strtok(src, ","), tag = *list; p; p = strtok(NULL, ","), tag++) { + for(p = strtok(src, ","), tag = *list; p; p = strtok(NULL, ",")) { char *s = strchr(p, '='); if(NULL == s || '\0' == *(s+1)) @@ -69,6 +69,7 @@ int edg_wll_TagListParse(const char *src, edg_wll_TagValue **list) { tag->tag = strdup(p); *s = '='; tag->value = strdup(s+1); + tag++; } tag->tag = NULL; tag->value = NULL; -- 1.8.2.3