summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2012-07-17 16:05:16 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2012-07-17 16:05:16 (GMT)
commitdfebc04ff6e4a337e06b7928cd2c414c61280692 (patch)
tree40f169d8f6eb1efc635edb5489557a7850a2c8c1
parent43995f12ac694455b3ca42292eb8cea15c08817e (diff)
downloadhdf5-dfebc04ff6e4a337e06b7928cd2c414c61280692.zip
hdf5-dfebc04ff6e4a337e06b7928cd2c414c61280692.tar.gz
hdf5-dfebc04ff6e4a337e06b7928cd2c414c61280692.tar.bz2
[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.
-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));