tabular output: fix segmentation fault
authorChristof Hanke <christof.hanke@rzg.mpg.de>
Wed, 4 Sep 2013 12:59:04 +0000 (14:59 +0200)
committerDerrick Brashear <shadow@your-file-system.com>
Fri, 13 Sep 2013 13:10:02 +0000 (06:10 -0700)
inititalize  Table->numAllocatedRows=0;

Change-Id: I72c6a687fde69cad3bf9aedd43d59d382455045b
Reviewed-on: http://gerrit.openafs.org/10225
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

src/util/tabular_output.c

index 7f8eb29..6c053cc 100644 (file)
@@ -366,6 +366,7 @@ util_newTable(int Type, int numColumns, char **ColumnHeaders, int *ColumnContent
     Table->Type=Type;
     Table->numColumns=numColumns;
     Table->numRows=0;
+    Table->numAllocatedRows=0;
     if (sortByColumn < 0 || sortByColumn > numColumns) {
         fprintf(stderr,"Invalid Table Sortkey: %d.\n", sortByColumn);
        errno=EINVAL;