summaryrefslogtreecommitdiffstats
path: root/src/H5Sselect.c
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2015-04-21 22:42:33 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2015-04-21 22:42:33 (GMT)
commit0a3151792fed6457cbd8092018b891f7f2b9653e (patch)
tree669b2259efc2ce8c79e0563db08265e3904b48b9 /src/H5Sselect.c
parentb31103b33225c39fe0ddaa0c3fa1cdaae64f7cbc (diff)
downloadhdf5-0a3151792fed6457cbd8092018b891f7f2b9653e.zip
hdf5-0a3151792fed6457cbd8092018b891f7f2b9653e.tar.gz
hdf5-0a3151792fed6457cbd8092018b891f7f2b9653e.tar.bz2
[svn-r26878] Fix errors in unlimited selection serialize/deserialize
Other minor fixes Tested: jam
Diffstat (limited to 'src/H5Sselect.c')
-rw-r--r--src/H5Sselect.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/H5Sselect.c b/src/H5Sselect.c
index a703cc3..52273c7 100644
--- a/src/H5Sselect.c
+++ b/src/H5Sselect.c
@@ -227,7 +227,7 @@ H5S_select_get_seq_list(const H5S_t *space, unsigned flags,
*-------------------------------------------------------------------------
*/
hssize_t
-H5S_select_serial_size(const H5S_t *space)
+H5S_select_serial_size(const H5F_t *f, const H5S_t *space)
{
hssize_t ret_value; /* Return value */
@@ -236,7 +236,7 @@ H5S_select_serial_size(const H5S_t *space)
HDassert(space);
/* Call the selection type's serial_size function */
- ret_value=(*space->select.type->serial_size)(space);
+ ret_value=(*space->select.type->serial_size)(f, space);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S_select_serial_size() */
@@ -508,9 +508,14 @@ H5S_select_deserialize(const H5F_t *f, H5S_t **space, const uint8_t **p)
/* Decode the rank of the point selection */
UINT32DECODE(*p,rank);
- if(!*space)
+ if(!*space) {
+ hsize_t dims[H5S_MAX_RANK];
+
/* Patch the rank of the allocated dataspace */
- tmp_space->extent.rank = rank;
+ (void)HDmemset(dims, 0, (size_t)rank * sizeof(dims[0]));
+ if(H5S__set_extent_simple(tmp_space, rank, dims, NULL) < 0)
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "can't set dimensions")
+ } /* end if */
else
/* Verify the rank of the provided dataspace */
if(rank != tmp_space->extent.rank)