diff options
author | jhendersonHDF <jhenderson@hdfgroup.org> | 2023-11-01 13:16:33 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-01 13:16:33 (GMT) |
commit | 562c53c44a22c979419deb1cb025b2a74900fbac (patch) | |
tree | c50148d3341883aff1aaa536e839c5d233bb43f6 /src/H5FDsec2.c | |
parent | a654b2c1c5670010e14d8fba6d287ce62c87169a (diff) | |
download | hdf5-562c53c44a22c979419deb1cb025b2a74900fbac.zip hdf5-562c53c44a22c979419deb1cb025b2a74900fbac.tar.gz hdf5-562c53c44a22c979419deb1cb025b2a74900fbac.tar.bz2 |
Fix misc. warnings from GCC when compiling with -fsanitize=undefined (#3787)
Diffstat (limited to 'src/H5FDsec2.c')
-rw-r--r-- | src/H5FDsec2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c index 2961684..15accf7 100644 --- a/src/H5FDsec2.c +++ b/src/H5FDsec2.c @@ -368,7 +368,7 @@ H5FD__sec2_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr } /* Retain a copy of the name used to open the file, for possible error reporting */ - strncpy(file->filename, name, sizeof(file->filename)); + strncpy(file->filename, name, sizeof(file->filename) - 1); file->filename[sizeof(file->filename) - 1] = '\0'; /* Check for non-default FAPL */ |