summaryrefslogtreecommitdiffstats
path: root/src/H5HFhuge.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2017-11-21 18:38:15 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2017-11-21 18:38:15 (GMT)
commit20bb11b52640befc4a0073520b23d9e49bf3e96c (patch)
treee1f8d0487c48264391c54f7c8f5aadf42f295290 /src/H5HFhuge.c
parent4d2e7ea66651e8902c91ea92f0236f327924d138 (diff)
downloadhdf5-20bb11b52640befc4a0073520b23d9e49bf3e96c.zip
hdf5-20bb11b52640befc4a0073520b23d9e49bf3e96c.tar.gz
hdf5-20bb11b52640befc4a0073520b23d9e49bf3e96c.tar.bz2
Fixed an uninitialized filter callback struct in H5Dchunk.c and
unified the naming and initialization of said struct throughout the library. This was causing a crash on VS2015 in debug mode when the debug heap complained. Fixes HDFFV-10330.
Diffstat (limited to 'src/H5HFhuge.c')
-rw-r--r--src/H5HFhuge.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/H5HFhuge.c b/src/H5HFhuge.c
index b2a1e68..350100e 100644
--- a/src/H5HFhuge.c
+++ b/src/H5HFhuge.c
@@ -345,9 +345,13 @@ HDfprintf(stderr, "%s: obj_size = %Zu\n", FUNC, obj_size);
/* Check for I/O pipeline filter on heap */
if(hdr->filter_len > 0) {
- H5Z_cb_t filter_cb = {NULL, NULL}; /* Filter callback structure */
+ H5Z_cb_t filter_cb; /* Filter callback structure */
size_t nbytes; /* Number of bytes used */
+ /* Initialize the filter callback struct */
+ filter_cb.op_data = NULL;
+ filter_cb.func = NULL; /* no callback function when failed */
+
/* Allocate buffer to perform I/O filtering on */
write_size = obj_size;
if(NULL == (write_buf = H5MM_malloc(write_size)))
@@ -773,10 +777,14 @@ H5HF_huge_op_real(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
/* Check for I/O pipeline filter on heap */
if(hdr->filter_len > 0) {
- H5Z_cb_t filter_cb = {NULL, NULL}; /* Filter callback structure */
+ H5Z_cb_t filter_cb; /* Filter callback structure */
size_t read_size; /* Object's size in the file */
size_t nbytes; /* Number of bytes used */
+ /* Initialize the filter callback struct */
+ filter_cb.op_data = NULL;
+ filter_cb.func = NULL; /* no callback function when failed */
+
/* De-filter the object */
read_size = nbytes = obj_size;
if(H5Z_pipeline(&(hdr->pline), H5Z_FLAG_REVERSE, &filter_mask, H5Z_NO_EDC, filter_cb, &nbytes, &read_size, &read_buf) < 0)