mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-01-18 15:15:56 +08:00
[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)
This commit is contained in:
parent
ec74fa4bea
commit
45ac464161
@ -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';
|
||||
|
Loading…
Reference in New Issue
Block a user