diff options
author | James Laird <jlaird@hdfgroup.org> | 2004-07-20 16:26:40 (GMT) |
---|---|---|
committer | James Laird <jlaird@hdfgroup.org> | 2004-07-20 16:26:40 (GMT) |
commit | 129f72fb3ed868fab0fa1cd71854aa1aad366336 (patch) | |
tree | 19b518f2ea800b1ddc22c9624918495cd64ba8fe /src/H5S.c | |
parent | 24d36e1613a38a6d99e9c81ecd6d83063aec11b3 (diff) | |
download | hdf5-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.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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 */ |