attr_union(): terminate array with NULL
authorAleš Křenek <ljocha@ics.muni.cz>
Thu, 16 Mar 2006 16:51:25 +0000 (16:51 +0000)
committerAleš Křenek <ljocha@ics.muni.cz>
Thu, 16 Mar 2006 16:51:25 +0000 (16:51 +0000)
org.glite.jp.primary/src/feed.c

index 17ebf30..ae60d8b 100644 (file)
@@ -252,6 +252,8 @@ static void attr_union(char **a, char **b, char ***c)
                if (j < cnt && j > i+1) memmove(out+i+1,out+j,(cnt-j) * sizeof *out);
                cnt -= j-i-1;
        }
+       assert(cnt);
+       out[cnt-1] = NULL;
 
        *c = out;
 }