tabular output: fix segmentation fault

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>
This commit is contained in:
Christof Hanke 2013-09-04 14:59:04 +02:00 committed by Derrick Brashear
parent 286065f6d2
commit 9fea1a29df

View File

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