From feb79ce8ea30f6cd3c85861b67f6f7fca772b3f7 Mon Sep 17 00:00:00 2001 From: Raymond Lu Date: Fri, 13 Jul 2012 17:10:57 -0500 Subject: [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. --- src/H5Pdcpl.c | 4 ++-- 1 file 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)); -- cgit v0.12