mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-02-17 16:10:24 +08:00
[svn-r19262] Undo r19261.
This commit is contained in:
parent
4050bd2422
commit
f4c75504d4
@ -4145,6 +4145,8 @@ render_bin_output_region_points(hid_t region_space, hid_t region_id,
|
||||
{
|
||||
HERR_INIT(hbool_t, TRUE)
|
||||
hssize_t npoints;
|
||||
hsize_t alloc_size;
|
||||
hsize_t *ptdata;
|
||||
int ndims;
|
||||
hid_t dtype;
|
||||
hid_t type_id;
|
||||
@ -4156,6 +4158,11 @@ render_bin_output_region_points(hid_t region_space, hid_t region_id,
|
||||
if((ndims = H5Sget_simple_extent_ndims(region_space)) < 0)
|
||||
H5E_THROW(FALSE, H5E_tools_min_id_g, "H5Sget_simple_extent_ndims failed");
|
||||
|
||||
alloc_size = npoints * ndims * sizeof(ptdata[0]);
|
||||
assert(alloc_size == (hsize_t) ((size_t) alloc_size)); /*check for overflow*/
|
||||
if((ptdata = malloc((size_t) alloc_size)) == NULL)
|
||||
HGOTO_ERROR(FALSE, H5E_tools_min_id_g, "Could not allocate buffer for ptdata");
|
||||
|
||||
H5_CHECK_OVERFLOW(npoints, hssize_t, hsize_t);
|
||||
if(H5Sget_select_elem_pointlist(region_space, (hsize_t) 0, (hsize_t) npoints, ptdata) < 0)
|
||||
HGOTO_ERROR(FALSE, H5E_tools_min_id_g, "H5Sget_select_elem_pointlist failed");
|
||||
|
Loading…
Reference in New Issue
Block a user