Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
e56c9435
Commit
e56c9435
authored
Nov 01, 2017
by
Uwe Schulzweida
Browse files
Docu update.
parent
e7c3df58
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
e56c9435
...
...
@@ -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)
...
...
src/cdf_write.c
View file @
e56c9435
...
...
@@ -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
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment