From 6b28409b546a355da67f61c3bb0cac5e2c0fa1c3 Mon Sep 17 00:00:00 2001 From: Dennis Heimbigner Date: Sun, 18 Jul 2021 19:38:02 -0600 Subject: [PATCH] Fix chunk key when using dimension_separator The construction of the chunk key is malformed when using dimension_separator rather than always using '/'. This is a priority bug. --- libnczarr/zutil.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libnczarr/zutil.c b/libnczarr/zutil.c index 891fe86ee..1908ad24b 100644 --- a/libnczarr/zutil.c +++ b/libnczarr/zutil.c @@ -894,13 +894,11 @@ NCZ_chunkpath(struct ChunkKey key,char dimsep) { size_t plen = nulllen(key.varkey)+1+nulllen(key.chunkkey); char* path = (char*)malloc(plen+1); - char sdimsep[2]; if(path == NULL) return NULL; path[0] = '\0'; strlcat(path,key.varkey,plen+1); - sdimsep[0] = dimsep; sdimsep[1] = '\0'; - strlcat(path,sdimsep,plen+1); + strlcat(path,"/",plen+1); strlcat(path,key.chunkkey,plen+1); return path; }