summaryrefslogtreecommitdiffstats
path: root/src/H5Pdcpl.c
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2012-07-13 22:10:57 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2012-07-13 22:10:57 (GMT)
commitfeb79ce8ea30f6cd3c85861b67f6f7fca772b3f7 (patch)
tree1300c4830fb62753af73ef2dae3a5c31d8d8054e /src/H5Pdcpl.c
parentc7513e17769563106991822acd597fa2fe81101b (diff)
downloadhdf5-feb79ce8ea30f6cd3c85861b67f6f7fca772b3f7.zip
hdf5-feb79ce8ea30f6cd3c85861b67f6f7fca772b3f7.tar.gz
hdf5-feb79ce8ea30f6cd3c85861b67f6f7fca772b3f7.tar.bz2
[svn-r22575] 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 and koala - simple change.
Diffstat (limited to 'src/H5Pdcpl.c')
-rw-r--r--src/H5Pdcpl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c
index 32793e6..54654c5 100644
--- a/src/H5Pdcpl.c
+++ b/src/H5Pdcpl.c
@@ -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));