30 lines
912 B
Diff
30 lines
912 B
Diff
|
From: Egbert Eich <eich@suse.com>
|
||
|
Date: Mon Jul 12 11:57:24 2021 +0200
|
||
|
Subject: NCZ_def_var_chunking(): make sure 'cs' is set before used
|
||
|
Patch-mainline: Not yet
|
||
|
Git-repo: https://github.com/Unidata/netcdf-c
|
||
|
Git-commit: 47584171d90e03b9ddad94cbc7edf1ab20f9d468
|
||
|
References:
|
||
|
|
||
|
'cs' was only set when 'var->ndim' != 0. Thus cs could have been
|
||
|
uninitialized when ncz_dev_var_extra() was called.
|
||
|
|
||
|
Signed-off-by: Egbert Eich <eich@suse.com>
|
||
|
Signed-off-by: Egbert Eich <eich@suse.de>
|
||
|
---
|
||
|
libnczarr/zvar.c | 2 +-
|
||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
diff --git a/libnczarr/zvar.c b/libnczarr/zvar.c
|
||
|
index 28ab00fb..d9e6af5b 100644
|
||
|
--- a/libnczarr/zvar.c
|
||
|
+++ b/libnczarr/zvar.c
|
||
|
@@ -865,7 +865,7 @@ int
|
||
|
ncz_def_var_chunking_ints(int ncid, int varid, int contiguous, int *chunksizesp)
|
||
|
{
|
||
|
NC_VAR_INFO_T *var;
|
||
|
- size_t *cs;
|
||
|
+ size_t *cs = NULL;
|
||
|
int i, retval;
|
||
|
|
||
|
/* Get pointer to the var. */
|