summaryrefslogtreecommitdiffstats
path: root/src/H5Osdspace.c
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2007-11-07 21:52:42 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2007-11-07 21:52:42 (GMT)
commit011b3da8135e0f4786d079a5e2e3fc2ced94f8a4 (patch)
treeea00674c961090dfcf39521cce38c0577af90f74 /src/H5Osdspace.c
parent82f785ee0c4fa1c6ee42b3e28b2670d45a94202a (diff)
downloadhdf5-011b3da8135e0f4786d079a5e2e3fc2ced94f8a4.zip
hdf5-011b3da8135e0f4786d079a5e2e3fc2ced94f8a4.tar.gz
hdf5-011b3da8135e0f4786d079a5e2e3fc2ced94f8a4.tar.bz2
[svn-r14243] Bug fix: Took out the verification of dimension size being zero in the function
H5O_sdspace_decode because this is an allowed situation. Tested on kagiso only because it's a simple change.
Diffstat (limited to 'src/H5Osdspace.c')
-rw-r--r--src/H5Osdspace.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/H5Osdspace.c b/src/H5Osdspace.c
index 79adf43..c97498a 100644
--- a/src/H5Osdspace.c
+++ b/src/H5Osdspace.c
@@ -163,13 +163,9 @@ H5O_sdspace_decode(H5F_t *f, hid_t UNUSED dxpl_id, unsigned UNUSED mesg_flags,
if(sdim->rank > 0) {
if(NULL == (sdim->size = (hsize_t *)H5FL_ARR_MALLOC(hsize_t, (size_t)sdim->rank)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
- for(i = 0; i < sdim->rank; i++) {
- H5F_DECODE_LENGTH(f, p, sdim->size[i]);
- /* Rudimentary check for overflow of the dimension size */
- if(sdim->size[i] == 0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_BADSIZE, NULL, "invalid size detected")
- } /* end for */
+ for(i = 0; i < sdim->rank; i++)
+ H5F_DECODE_LENGTH(f, p, sdim->size[i]);
if(flags & H5S_VALID_MAX) {
if(NULL == (sdim->max = (hsize_t *)H5FL_ARR_MALLOC(hsize_t, (size_t)sdim->rank)))