Skip to content
GitLab
Menu
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
adc474bb
Commit
adc474bb
authored
Aug 24, 2018
by
Uwe Schulzweida
Browse files
NetCDF zero length number attributes cause null-pointer dereference [Bug: #8589].
parent
23bafc45
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/grid.c
View file @
adc474bb
...
...
@@ -96,8 +96,8 @@ bool cdiInqAttConvertedToFloat(int gridID, int atttype, const char *attname, int
{
int
attint
;
int
*
pattint
=
attlen
>
1
?
(
int
*
)
malloc
(
attlen
*
sizeof
(
int
))
:
&
attint
;
cdiInqAttInt
(
gridID
,
CDI_GLOBAL
,
attname
,
attlen
,
attint
);
for
(
int
i
=
0
;
i
<
attlen
;
++
i
)
attflt
[
i
]
=
(
double
)
attint
[
i
];
cdiInqAttInt
(
gridID
,
CDI_GLOBAL
,
attname
,
attlen
,
p
attint
);
for
(
int
i
=
0
;
i
<
attlen
;
++
i
)
attflt
[
i
]
=
(
double
)
p
attint
[
i
];
if
(
attlen
>
1
)
free
(
pattint
);
}
else
if
(
atttype
==
CDI_DATATYPE_FLT32
||
atttype
==
CDI_DATATYPE_FLT64
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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