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.
This commit is contained in:
Dennis Heimbigner 2021-07-18 19:38:02 -06:00
parent 669fd34357
commit 6b28409b54

View File

@ -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;
}