summaryrefslogtreecommitdiffstats
path: root/tools/src/h5dump
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2018-11-08 17:27:22 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2018-11-08 17:27:22 (GMT)
commit3b9e13a1b819584c91bfaa134536345a1460f44f (patch)
treeec15921ace74f90c89c989d5e75a970c2c573874 /tools/src/h5dump
parent0a7424c7d0664b778be9d75db373793cb2f949c9 (diff)
downloadhdf5-3b9e13a1b819584c91bfaa134536345a1460f44f.zip
hdf5-3b9e13a1b819584c91bfaa134536345a1460f44f.tar.gz
hdf5-3b9e13a1b819584c91bfaa134536345a1460f44f.tar.bz2
TRILAB-82 fix coverity high-impact issues
Diffstat (limited to 'tools/src/h5dump')
-rw-r--r--tools/src/h5dump/h5dump_xml.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/src/h5dump/h5dump_xml.c b/tools/src/h5dump/h5dump_xml.c
index e399d8f..ec76511 100644
--- a/tools/src/h5dump/h5dump_xml.c
+++ b/tools/src/h5dump/h5dump_xml.c
@@ -3438,8 +3438,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "\"");
for (i = 0; i < sz; i++) {
- h5tools_str_append(&buffer, "%x ", *(unsigned int *) buf);
- buf = (char *) buf + sizeof(unsigned int);
+ h5tools_str_append(&buffer, "%x ", *(unsigned int *) buf + (i * sizeof(unsigned int)));
}
h5tools_str_append(&buffer, "\"");
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);