summaryrefslogtreecommitdiffstats
path: root/tools/h5dump/h5dump.c
diff options
context:
space:
mode:
authorJames Laird <jlaird@hdfgroup.org>2006-10-30 20:24:19 (GMT)
committerJames Laird <jlaird@hdfgroup.org>2006-10-30 20:24:19 (GMT)
commitc19a43d85474fc21308cb3e5e59dbc535edf4174 (patch)
tree0a269c5f1be8e1c2d5cf3fc9de437d9d2cda8b4f /tools/h5dump/h5dump.c
parent780fefb82913150a4f95ca25e8d72758e764dbad (diff)
downloadhdf5-c19a43d85474fc21308cb3e5e59dbc535edf4174.zip
hdf5-c19a43d85474fc21308cb3e5e59dbc535edf4174.tar.gz
hdf5-c19a43d85474fc21308cb3e5e59dbc535edf4174.tar.bz2
[svn-r12831] Changed the API for "unpacking" an external link value to take the size of
the linkval buffer, per Elena and Frank's suggestions while revising the documentation. Added error checking using this size, as well as a couple of tests. Tested on juniper, kagiso, and sol.
Diffstat (limited to 'tools/h5dump/h5dump.c')
-rw-r--r--tools/h5dump/h5dump.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c
index 3f51f81..384b765 100644
--- a/tools/h5dump/h5dump.c
+++ b/tools/h5dump/h5dump.c
@@ -1560,7 +1560,7 @@ dump_all(hid_t group, const char *name, void * op_data)
d_status = EXIT_FAILURE;
ret = FAIL;
} else {
- if(H5Lunpack_elink_val(targbuf, &filename, &targname) < 0) {
+ if(H5Lunpack_elink_val(targbuf, statbuf.linklen, &filename, &targname) < 0) {
error_msg(progname, "unable to unpack external link value\n");
d_status = EXIT_FAILURE;
ret = FAIL;
@@ -3248,7 +3248,7 @@ handle_links(hid_t fid, char *links, void UNUSED * data)
begin_obj(dump_header_format->extlinkbegin, links,
dump_header_format->extlinkblockbegin);
if (H5Lget_linkval(fid, links, statbuf.linklen, buf, H5P_DEFAULT) >= 0) {
- if(H5Lunpack_elink_val(buf, &elink_file, &elink_path)>=0) {
+ if(H5Lunpack_elink_val(buf, statbuf.linklen, &elink_file, &elink_path)>=0) {
indentation(COL);
printf("LINKCLASS %d\n", linfo.type);
indentation(COL);