Commit e56c9435 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Docu update.

parent e7c3df58
......@@ -2,6 +2,10 @@
* Version 1.9.2 released
2017-11-01 Uwe Schulzweida
* Check chunk size limit of 2GB
2017-10-20 Uwe Schulzweida
* gridInqXinc: added support for negativ values (bug fix)
......
......@@ -401,6 +401,12 @@ int cdfDefVar(stream_t *streamptr, int varID)
if ( xid != CDI_UNDEFID ) dims[ndims++] = xid;
*/
size_t chunk_size_max = 65536;
if ( chunktype != CDI_CHUNK_LINES && gridsize > INT32_MAX )
{
if ( CDI_Debug ) fprintf(stderr, "gridsize > %d, changed chunktype to CDI_CHUNK_LINES!\n", INT32_MAX);
chunktype = CDI_CHUNK_LINES;
}
for ( int id = 0; id < 3; ++id )
{
if ( dimorder[id] == 3 && zid != CDI_UNDEFID )
......@@ -424,14 +430,14 @@ int cdfDefVar(stream_t *streamptr, int varID)
if ( chunktype == CDI_CHUNK_AUTO && yid == CDI_UNDEFID )
chunks[ndims] = (chunk_size_max > xsize) ? xsize : chunk_size_max;
else
chunks[ndims] = xsize;
chunks[ndims] = (xsize > INT32_MAX) ? INT32_MAX : xsize;
dims[ndims] = xid;
ndims++;
}
}
if ( CDI_Debug )
fprintf(stderr, "chunktype %d chunks %d %d %d %d\n", chunktype, (int)chunks[0], (int)chunks[1], (int)chunks[2], (int)chunks[3]);
fprintf(stderr, "chunktype %d chunks %zu %zu %zu %zu\n", chunktype, chunks[0], chunks[1], chunks[2], chunks[3]);
char varname[CDI_MAX_NAME];
char name[CDI_MAX_NAME]; name[0] = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment