Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed H5Ovisit2 change of behavior between 1.10.11 and v1.14.4.3
In H5O_get_info() of 1.10.11: HDmemset(oinfo, 0, sizeof(*oinfo)) set oinfo->type to 0, which was also the value of H5O_TYPE_GROUP, so oinfo->type accidentally had a correct value when the object was a group. If oinfo->type were initialized to H5O_TYPE_UNKNOWN as it should be, the application would have behaved the same way as with 1.14.3, whose H5O_get_info() called H5O__reset_info2() that set oinfo->type to H5O_TYPE_UNKNOWN. So, it was a case of coincidentally correct behavior in 1.10.11. The fix is to assign the correct value to oinfo->type early on instead of only when the requested info is H5O_INFO_BASIC. For that matter, probably all or some of the fields being set in the H5O_INFO_BASIC block should be changed the same way to prevent similar potential errors. (GH HDFGroup#2136)
- Loading branch information