summaryrefslogtreecommitdiffstats
path: root/tools/src/h5import/h5import.c
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-07-30 16:25:24 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-07-30 16:26:14 (GMT)
commitff4a9d0ec2e85cf15f769006e92e756a79869ab8 (patch)
tree1f6654046dcc7f47103dcf24e8e5fe1f50035434 /tools/src/h5import/h5import.c
parent2ece66e999876e78dcc8561ee2a2122e88fb14a1 (diff)
downloadhdf5-ff4a9d0ec2e85cf15f769006e92e756a79869ab8.zip
hdf5-ff4a9d0ec2e85cf15f769006e92e756a79869ab8.tar.gz
hdf5-ff4a9d0ec2e85cf15f769006e92e756a79869ab8.tar.bz2
Warnings reduction in tools
Diffstat (limited to 'tools/src/h5import/h5import.c')
-rw-r--r--tools/src/h5import/h5import.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/src/h5import/h5import.c b/tools/src/h5import/h5import.c
index b11fe7f..4a642e0 100644
--- a/tools/src/h5import/h5import.c
+++ b/tools/src/h5import/h5import.c
@@ -3735,8 +3735,8 @@ static int getExternalFilename(struct Input *in, FILE *strm)
return (-1);
}
- in->externFilename = (char *) HDmalloc ((size_t) (HDstrlen(temp)) * sizeof(char));
- (void) HDstrcpy(in->externFilename, temp);
+ in->externFilename = (char *) HDmalloc ((size_t) (HDstrlen(temp) + 1) * sizeof(char));
+ (void) HDstrncpy(in->externFilename, temp, HDstrlen(temp) + 1);
return (0);
}