projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c60b127
)
ODS Reader: fix uninitialised variables
20120219030503/pspp
author
John Darrington
<john@darrington.wattle.id.au>
Sun, 19 Feb 2012 08:48:31 +0000
(09:48 +0100)
committer
John Darrington
<john@darrington.wattle.id.au>
Sun, 19 Feb 2012 08:48:31 +0000
(09:48 +0100)
src/data/ods-reader.c
patch
|
blob
|
history
diff --git
a/src/data/ods-reader.c
b/src/data/ods-reader.c
index ea8b9ad56b62fa279116a21703cfaf529ec747ec..122e98c76d90060da92d7e79bca19adcc2599ff0 100644
(file)
--- 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);
}