From 0ae9a2d50982969c4d9627864f79a0e17191a1b7 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Sun, 19 Feb 2012 09:48:31 +0100 Subject: [PATCH] ODS Reader: fix uninitialised variables --- src/data/ods-reader.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/data/ods-reader.c b/src/data/ods-reader.c index ea8b9ad56b..122e98c76d 100644 --- a/src/data/ods-reader.c +++ b/src/data/ods-reader.c @@ -411,8 +411,10 @@ ods_open_reader (struct spreadsheet_read_info *gri, struct dictionary **dict) /* If CELLRANGE was given, then we know how many variables should be read */ if ( r->stop_col != -1 ) { + assert (var_spec == NULL); n_var_specs = r->stop_col - r->start_col + 1; var_spec = xrealloc (var_spec, sizeof (*var_spec) * n_var_specs); + memset (var_spec, '\0', sizeof (*var_spec) * n_var_specs); } -- 2.30.2