aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/util/hdf5_convert_from_ieeeio.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/util/hdf5_convert_from_ieeeio.c b/src/util/hdf5_convert_from_ieeeio.c
index e38b969..f712c38 100644
--- a/src/util/hdf5_convert_from_ieeeio.c
+++ b/src/util/hdf5_convert_from_ieeeio.c
@@ -160,6 +160,12 @@ int main (int argc, char **argv)
assert (dataset >= 0);
data = malloc (IOnBytes (ieeeDatatype, rank, dims));
+ if (data == NULL)
+ {
+ fprintf (stderr, "Could not allocate %d bytes to read in dataset\n",
+ IOnBytes (ieeeDatatype, rank, dims));
+ return (-1);
+ }
IOread (infile, data);
assert (H5Dwrite (dataset, hdf5Datatype, H5S_ALL, H5S_ALL, H5P_DEFAULT,
data) >= 0);