diff options
author | Jonathan Kim <jkm@hdfgroup.org> | 2012-01-05 15:16:03 (GMT) |
---|---|---|
committer | Jonathan Kim <jkm@hdfgroup.org> | 2012-01-05 15:16:03 (GMT) |
commit | d174933e1953dc11a32a4715beec166a2490487f (patch) | |
tree | df4274a5f10fab9a8375edefae8367aa295ad987 /tools/h5ls/h5ls.c | |
parent | 7d0c15b7944577e94d02f7b4fb6a63977901adf0 (diff) | |
download | hdf5-d174933e1953dc11a32a4715beec166a2490487f.zip hdf5-d174933e1953dc11a32a4715beec166a2490487f.tar.gz hdf5-d174933e1953dc11a32a4715beec166a2490487f.tar.bz2 |
[svn-r21865] Purpose:
Fix for HDFFV-7838 h5ls: segfault for handling region reference in attribute with -v option
Description:
Segfault occurred when h5ls access region reference data in an attribute.
This didn't occurred when -v option was used.
The cause was "h5tool_format_t info;" struct variable members were accessed
without proper values were assigned (was NULL), so printf failed later in the code.
Tested:
jam (linux32-LE), koala (linux64-LE), heiwa (linuxppc64-BE), tejeda (mac32-LE), linew (solaris-BE), cmake-Windows (32-LE)
Diffstat (limited to 'tools/h5ls/h5ls.c')
-rw-r--r-- | tools/h5ls/h5ls.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/h5ls/h5ls.c b/tools/h5ls/h5ls.c index a00a9e1..66e588f 100644 --- a/tools/h5ls/h5ls.c +++ b/tools/h5ls/h5ls.c @@ -1447,9 +1447,15 @@ list_attr(hid_t obj, const char *attr_name, const H5A_info_t UNUSED *ainfo, info.line_suf = "\""; } /* end if */ - /* values of type reference */ + /* values of reference type formats */ + info.dset_format = "DSET-%s "; + info.dset_hidefileno = 1; + info.dset_blockformat_pre = "%sBlk%lu: "; + info.dset_ptformat_pre = "%sPt%lu: "; + info.obj_format = "-%lu:"H5_PRINTF_HADDR_FMT; info.obj_hidefileno = 0; + if(hexdump_g) p_type = H5Tcopy(type); else |