summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2020-08-18 05:49:09 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2020-08-18 05:49:09 (GMT)
commitede1b9b1dd53caad6dfce8ec7bc4aa7b3dbce62c (patch)
tree5c7815e4f0dea82e308ef638f4846bdf2f0867f6 /src
parentfa7ae0e001289e8cc2c04c2f3cf8ff03bfc83ddb (diff)
downloadhdf5-ede1b9b1dd53caad6dfce8ec7bc4aa7b3dbce62c.zip
hdf5-ede1b9b1dd53caad6dfce8ec7bc4aa7b3dbce62c.tar.gz
hdf5-ede1b9b1dd53caad6dfce8ec7bc4aa7b3dbce62c.tar.bz2
Fix HDFFV-11101
Description Added initialization to local structs in the src function H5MF_settle_raw_data_fsm() and the test function test_bt2_hdr_fd() to prevent the following error in two different occurrences: MemorySanitizer: use-of-uninitialized-value Platforms tested: Linux/64 (jelly)
Diffstat (limited to 'src')
-rw-r--r--src/H5MF.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/H5MF.c b/src/H5MF.c
index 1c5c3af..6f1217f 100644
--- a/src/H5MF.c
+++ b/src/H5MF.c
@@ -2674,6 +2674,10 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled)
HDassert(f->shared);
HDassert(fsm_settled);
+ /* Initialize structs */
+ HDmemset(&fsinfo, 0, sizeof(fsinfo));
+ HDmemset(&fs_stat, 0, sizeof(fs_stat));
+
/* Only need to settle things if we are persisting the free space info
* and allocation/deallocation has occurred.
*/