summaryrefslogtreecommitdiffstats
path: root/src/H5S.c
diff options
context:
space:
mode:
authorJames Laird <jlaird@hdfgroup.org>2004-07-20 16:26:40 (GMT)
committerJames Laird <jlaird@hdfgroup.org>2004-07-20 16:26:40 (GMT)
commit129f72fb3ed868fab0fa1cd71854aa1aad366336 (patch)
tree19b518f2ea800b1ddc22c9624918495cd64ba8fe /src/H5S.c
parent24d36e1613a38a6d99e9c81ecd6d83063aec11b3 (diff)
downloadhdf5-129f72fb3ed868fab0fa1cd71854aa1aad366336.zip
hdf5-129f72fb3ed868fab0fa1cd71854aa1aad366336.tar.gz
hdf5-129f72fb3ed868fab0fa1cd71854aa1aad366336.tar.bz2
[svn-r8899]
Purpose: Bug Fix Description: Calling H5Sset_extent_simple to change a dataspace's maxdims from nonzero to zero causes errors (infinite loops, seg faults, asserts) because the pointer to the maximum size isn't cleaned up properly Solution: Clean up that pointer. Added a test for this case. Platforms tested: sleipnir (very minor change)
Diffstat (limited to 'src/H5S.c')
-rw-r--r--src/H5S.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/H5S.c b/src/H5S.c
index fe54afb..ebdbbfb 100644
--- a/src/H5S.c
+++ b/src/H5S.c
@@ -1367,6 +1367,9 @@ H5S_set_extent_simple (H5S_t *space, unsigned rank, const hsize_t *dims,
space->extent.max = H5FL_ARR_MALLOC(hsize_t,rank);
HDmemcpy(space->extent.max, max, sizeof(hsize_t) * rank);
} /* end if */
+ else {
+ space->extent.max = NULL;
+ }
}
/* Selection related cleanup */