[svn-r22585] Issue 8068 - A user reported some random data in the padding of fill value. The problem happened in H5P_get_fill_value. I believe it's because the background buffer wasn't big enough. So I corrected it in this checkin.
Tested on jam - simple change. I'm porting the fix from the trunk.
This commit is contained in:
@@ -1563,8 +1563,8 @@ H5P_get_fill_value(H5P_genplist_t *plist, const H5T_t *type, void *value/*out*/,
|
||||
else {
|
||||
if(NULL == (buf = H5MM_malloc(H5T_get_size(fill.type))))
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "memory allocation failed for type conversion")
|
||||
if(H5T_path_bkg(tpath))
|
||||
bkg = value;
|
||||
if(H5T_path_bkg(tpath) && NULL == (bkg = H5MM_malloc(H5T_get_size(fill.type))))
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "memory allocation failed for type conversion")
|
||||
} /* end else */
|
||||
HDmemcpy(buf, fill.buf, H5T_get_size(fill.type));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user