summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2006-10-23 22:21:23 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2006-10-23 22:21:23 (GMT)
commit45ac4641615d1b0e92c903b0f3fafd154aa1ff31 (patch)
tree7a52d98e9b4baf3ee54f16c14bf14bd831a4a178 /src
parentec74fa4bea7e0fef5a655490300554a297b37192 (diff)
downloadhdf5-45ac4641615d1b0e92c903b0f3fafd154aa1ff31.zip
hdf5-45ac4641615d1b0e92c903b0f3fafd154aa1ff31.tar.gz
hdf5-45ac4641615d1b0e92c903b0f3fafd154aa1ff31.tar.bz2
[svn-r12805] Description:
Fix off-by-one memory error when retrieving I/O pipeline filter's name. Tested on: Linux/64 2.4 (mir) FreeBSD/32 4.11 (sleipnir)
Diffstat (limited to 'src')
-rw-r--r--src/H5Pdcpl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c
index 51c20be..42de1a5 100644
--- a/src/H5Pdcpl.c
+++ b/src/H5Pdcpl.c
@@ -787,14 +787,14 @@ H5P_get_filter(const H5Z_filter_info_t *filter, unsigned int *flags/*out*/,
/* Check for actual name */
if(s) {
HDstrncpy(name, s, namelen);
- name[namelen] = '\0';
+ name[namelen - 1] = '\0';
} /* end if */
else {
/* Check for unknown library filter */
/* (probably from a future version of the library) */
if(filter->id < 256) {
HDstrncpy(name, "Unknown library filter", namelen);
- name[namelen] = '\0';
+ name[namelen - 1] = '\0';
} /* end if */
else
name[0] = '\0';