summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--release_docs/RELEASE.txt26
-rw-r--r--tools/src/h5repack/h5repack_filters.c12
2 files changed, 33 insertions, 5 deletions
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index 04f2ce0..790313f 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -300,6 +300,32 @@ Bug Fixes since HDF5-1.10.1 release
Tools
-----
+ - h5repack
+
+ h5repack incorrectly searched internal object table for name.
+
+ h5repack would search the table of objects for a name, if the
+ name did not match it tried to determine if the name without a
+ leading slash would match. The logic was flawed! The table
+ stored names(paths) without a leading slash and did a strstr
+ of the table path to the name.
+ The assumption was that if there was a difference of one then
+ it was a match, however "pressure" would match "/pressure" as
+ well as "/pressure1", "/pressure2", etc. Changed logic to remove
+ any leading slash and then do a full compare of the name.
+
+ (ADB - 2018/01/18, HDFFV-10393)
+
+ - h5repack
+
+ h5repack failed to handle more then 9 chars for int conversion.
+
+ User defined filter parameter conversions would fail for integers
+ larger then 9 characters. Increased local variable array for storing
+ the current command line parameter to prevent buffer overflows.
+
+ (ADB - 2018/01/17, HDFFV-10392)
+
- h5diff
h5diff seg faulted if comparing VL strings against fixed strings.
diff --git a/tools/src/h5repack/h5repack_filters.c b/tools/src/h5repack/h5repack_filters.c
index 067ebad..ae0bfd5 100644
--- a/tools/src/h5repack/h5repack_filters.c
+++ b/tools/src/h5repack/h5repack_filters.c
@@ -84,7 +84,8 @@ static int aux_find_obj(const char* name, /* object name from traverse list */
pack_opt_t *options, /* repack options */
pack_info_t *obj /*OUT*/) /* info about object to filter */
{
- char *pdest;
+ char *pdest = NULL;
+ char *pname = NULL;
int result;
unsigned int i;
@@ -94,11 +95,12 @@ static int aux_find_obj(const char* name, /* object name from traverse list */
return (int) i;
}
- pdest = HDstrstr(name, options->op_tbl->objs[i].path);
- result = (int) (pdest - name);
+ pdest = options->op_tbl->objs[i].path;
+ if (pdest[0] == '/') pdest++;
+ pname = name;
+ if (pname[0] == '/') pname++;
- /* found at position 1, meaning without '/' */
- if (pdest != NULL && result == 1) {
+ if (HDstrcmp(pdest, pname) == 0) {
*obj = options->op_tbl->objs[i];
return (int) i;
}