summaryrefslogtreecommitdiffstats
path: root/src/H5Pdapl.c
diff options
context:
space:
mode:
authorjhendersonHDF <jhenderson@hdfgroup.org>2022-04-14 14:05:40 (GMT)
committerGitHub <noreply@github.com>2022-04-14 14:05:40 (GMT)
commit3961f6500d8303ff03bdd8fb38b0edc618b128ab (patch)
treee5866d374dfb2151e58d1ec1a64e9449fe6be504 /src/H5Pdapl.c
parent1a1e59172dc6312808981baeca4bc1772e126ff3 (diff)
downloadhdf5-3961f6500d8303ff03bdd8fb38b0edc618b128ab.zip
hdf5-3961f6500d8303ff03bdd8fb38b0edc618b128ab.tar.gz
hdf5-3961f6500d8303ff03bdd8fb38b0edc618b128ab.tar.bz2
Hdf5 1 10 merges (#1633)
Diffstat (limited to 'src/H5Pdapl.c')
-rw-r--r--src/H5Pdapl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/H5Pdapl.c b/src/H5Pdapl.c
index 3b14959..a471640 100644
--- a/src/H5Pdapl.c
+++ b/src/H5Pdapl.c
@@ -1451,7 +1451,7 @@ H5Pget_efile_prefix(hid_t plist_id, char *prefix, size_t size)
/* Copy to user's buffer, if given */
len = HDstrlen(my_prefix);
if (prefix) {
- HDstrncpy(prefix, my_prefix, MIN(len + 1, size));
+ HDstrncpy(prefix, my_prefix, size);
if (len >= size)
prefix[size - 1] = '\0';
} /* end if */
@@ -1541,7 +1541,7 @@ H5Pget_virtual_prefix(hid_t plist_id, char *prefix, size_t size)
/* Copy to user's buffer, if given */
len = HDstrlen(my_prefix);
if (prefix) {
- HDstrncpy(prefix, my_prefix, MIN(len + 1, size));
+ HDstrncpy(prefix, my_prefix, size);
if (len >= size)
prefix[size - 1] = '\0';
} /* end if */