summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2020-07-23 22:22:34 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2020-07-23 22:22:34 (GMT)
commit0a8408a3f916cedb63be28380038696dd662e3ca (patch)
treec113e4569460988325f4b83e2fafe40f00c75971 /src
parenta5f61c36aea198cc99c593e4c87e7bd8bcfbd201 (diff)
parent2d7a23887a6c5121b4dac858a50792a18087c5bf (diff)
downloadhdf5-0a8408a3f916cedb63be28380038696dd662e3ca.zip
hdf5-0a8408a3f916cedb63be28380038696dd662e3ca.tar.gz
hdf5-0a8408a3f916cedb63be28380038696dd662e3ca.tar.bz2
Merge pull request #2708 in HDFFV/hdf5 from ~VCHOI/my_third_fork:bugfix/18_HDFFV-11080-heap-use-after-free-by-the-call to hdf5_1_8
* commit '2d7a23887a6c5121b4dac858a50792a18087c5bf': Incorporate pull request #2693 from develop for the fix to HDFFV-11080: (1) Patch up the file pointer when reading attribute of variable length datatype (2) Test to verify the fix when doing multiple threads (3) Update MANIFEST (4) Add new test to Cmake
Diffstat (limited to 'src')
-rw-r--r--src/H5Aint.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/H5Aint.c b/src/H5Aint.c
index fb63789..6dadea2 100644
--- a/src/H5Aint.c
+++ b/src/H5Aint.c
@@ -623,6 +623,10 @@ H5A_read(const H5A_t *attr, const H5T_t *mem_type, void *buf, hid_t dxpl_id)
HDassert(attr);
HDassert(mem_type);
HDassert(buf);
+
+ /* Patch the top level file pointer in attr->shared->dt->shared->u.vlen.f if needed */
+ if(H5T_patch_vlen_file(attr->shared->dt, attr->oloc.file) < 0 )
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't patch VL datatype file pointer")
/* Create buffer for data to store on disk */
if((snelmts = H5S_GET_EXTENT_NPOINTS(attr->shared->ds)) < 0)