From: Christof Hanke Date: Wed, 4 Sep 2013 12:59:04 +0000 (+0200) Subject: tabular output: fix segmentation fault X-Git-Tag: upstream/1.8.0_pre1^2~1008 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=9fea1a29dff48d5f49420c6207255e5d6e7c8053;p=packages%2Fo%2Fopenafs.git tabular output: fix segmentation fault inititalize Table->numAllocatedRows=0; Change-Id: I72c6a687fde69cad3bf9aedd43d59d382455045b Reviewed-on: http://gerrit.openafs.org/10225 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- diff --git a/src/util/tabular_output.c b/src/util/tabular_output.c index 7f8eb291a..6c053ccac 100644 --- a/src/util/tabular_output.c +++ b/src/util/tabular_output.c @@ -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;