summaryrefslogtreecommitdiffstats
path: root/src/H5A.c
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2020-10-26 18:04:35 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2020-10-26 18:04:35 (GMT)
commit273c0c18368e5e54d61467e9e5b70e6fd87981c5 (patch)
treec833ab2f1b28d4a8ad0b5687390201fc6c013abc /src/H5A.c
parenta4269a08b91e794c1de4058348e076be9fef657e (diff)
downloadhdf5-273c0c18368e5e54d61467e9e5b70e6fd87981c5.zip
hdf5-273c0c18368e5e54d61467e9e5b70e6fd87981c5.tar.gz
hdf5-273c0c18368e5e54d61467e9e5b70e6fd87981c5.tar.bz2
Fix HDFFV-10590
Description This is to fix the CVE issue CVE-2018-17432. h5repack produced a segfault on a corrupted file. This fix modified the dataspace encode and decode functions per Quincey's suggestion to prevent the segfault and h5repack only failed for the corrupted file now. Platforms tested: Linux/64 (jelly)
Diffstat (limited to 'src/H5A.c')
-rw-r--r--src/H5A.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/H5A.c b/src/H5A.c
index b5bd0e8..7071f05 100644
--- a/src/H5A.c
+++ b/src/H5A.c
@@ -350,8 +350,7 @@ H5Acreate_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, hid
hid_t ret_value = H5I_INVALID_HID; /* Return value */
FUNC_ENTER_API(H5I_INVALID_HID)
- H5TRACE8("i", "i*s*siiiii", loc_id, obj_name, attr_name, type_id, space_id,
- acpl_id, aapl_id, lapl_id);
+ H5TRACE8("i", "i*s*siiiii", loc_id, obj_name, attr_name, type_id, space_id, acpl_id, aapl_id, lapl_id);
/* Check arguments */
if (H5I_ATTR == H5I_get_type(loc_id))
@@ -575,8 +574,7 @@ H5Aopen_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_iter_
hid_t ret_value = H5I_INVALID_HID; /* Return value */
FUNC_ENTER_API(H5I_INVALID_HID)
- H5TRACE7("i", "i*sIiIohii", loc_id, obj_name, idx_type, order, n, aapl_id,
- lapl_id);
+ H5TRACE7("i", "i*sIiIohii", loc_id, obj_name, idx_type, order, n, aapl_id, lapl_id);
/* Check arguments */
if (H5I_ATTR == H5I_get_type(loc_id))
@@ -905,8 +903,7 @@ H5Aget_name_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_i
ssize_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE8("Zs", "i*sIiIohxzi", loc_id, obj_name, idx_type, order, n, name, size,
- lapl_id);
+ H5TRACE8("Zs", "i*sIiIohxzi", loc_id, obj_name, idx_type, order, n, name, size, lapl_id);
/* Check args */
if (H5I_ATTR == H5I_get_type(loc_id))
@@ -1104,8 +1101,7 @@ H5Aget_info_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_i
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE7("e", "i*sIiIoh*xi", loc_id, obj_name, idx_type, order, n, ainfo,
- lapl_id);
+ H5TRACE7("e", "i*sIiIoh*xi", loc_id, obj_name, idx_type, order, n, ainfo, lapl_id);
/* Check args */
if (H5I_ATTR == H5I_get_type(loc_id))
@@ -1222,8 +1218,7 @@ H5Arename_by_name(hid_t loc_id, const char *obj_name, const char *old_attr_name,
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE5("e", "i*s*s*si", loc_id, obj_name, old_attr_name, new_attr_name,
- lapl_id);
+ H5TRACE5("e", "i*s*s*si", loc_id, obj_name, old_attr_name, new_attr_name, lapl_id);
/* check arguments */
if (H5I_ATTR == H5I_get_type(loc_id))
@@ -1391,8 +1386,7 @@ H5Aiterate_by_name(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_i
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
- H5TRACE8("e", "i*sIiIo*hx*xi", loc_id, obj_name, idx_type, order, idx, op,
- op_data, lapl_id);
+ H5TRACE8("e", "i*sIiIo*hx*xi", loc_id, obj_name, idx_type, order, idx, op, op_data, lapl_id);
/* Check arguments */
if (H5I_ATTR == H5I_get_type(loc_id))