mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-01-30 15:32:37 +08:00
[svn-r13459] Fix for Bug #763 - failure to create dataset of variable-length data with fill value. In function
H5O_fill_convert, the background buffer was allocated without clearing. Later in H5T_vlen_disk_write , library thought there's data in this background buffer. Changed the allocating function to CALLOC.
This commit is contained in:
parent
ade2b24a44
commit
1b23b0e8c1
@ -811,7 +811,10 @@ H5O_fill_convert(H5O_fill_t *fill, H5T_t *dset_type, hbool_t *fill_changed, hid_
|
||||
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for type conversion")
|
||||
HDmemcpy(buf, fill->buf, H5T_get_size(fill->type));
|
||||
} /* end else */
|
||||
if(H5T_path_bkg(tpath) && NULL == (bkg = H5MM_malloc(H5T_get_size(dset_type))))
|
||||
|
||||
/* Use CALLOC here to clear the buffer in case later the library thinks there's
|
||||
* data in the background. */
|
||||
if(H5T_path_bkg(tpath) && NULL == (bkg = H5MM_calloc(H5T_get_size(dset_type))))
|
||||
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for type conversion")
|
||||
|
||||
/* Do the conversion */
|
||||
|
Loading…
Reference in New Issue
Block a user