summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5tools_ref.c
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2017-08-23 13:58:06 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2017-08-23 13:58:06 (GMT)
commit2bd8e1053b89e0348364f951a58449f16aa72da7 (patch)
treeaa787d2139ada836f7064c43b581a81c5dc8d193 /tools/lib/h5tools_ref.c
parente4299d463efa0736bc51513b15827e58046cc061 (diff)
downloadhdf5-2bd8e1053b89e0348364f951a58449f16aa72da7.zip
hdf5-2bd8e1053b89e0348364f951a58449f16aa72da7.tar.gz
hdf5-2bd8e1053b89e0348364f951a58449f16aa72da7.tar.bz2
HDFFV-10188 merge fix and tests from develop
Diffstat (limited to 'tools/lib/h5tools_ref.c')
-rw-r--r--tools/lib/h5tools_ref.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/lib/h5tools_ref.c b/tools/lib/h5tools_ref.c
index 85850e3..16a949d 100644
--- a/tools/lib/h5tools_ref.c
+++ b/tools/lib/h5tools_ref.c
@@ -11,8 +11,6 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#include <stdio.h>
-#include <stdlib.h>
#include "h5tools_ref.h"
#include "H5private.h"
#include "H5SLprivate.h"
@@ -166,7 +164,8 @@ haddr_t
ref_path_table_lookup(const char *thepath)
{
H5O_info_t oi;
-
+ if((HDstrlen(thepath) == 0) || (thepath == NULL))
+ return HADDR_UNDEF;
/* Allow lookups on the root group, even though it doesn't have any link info */
if(HDstrcmp(thepath, "/")) {
H5L_info_t li;