summaryrefslogtreecommitdiffstats
path: root/src/H5Gname.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2013-02-08 20:36:31 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2013-02-08 20:36:31 (GMT)
commitd91625d1392bfccdc500b151444030a05a639675 (patch)
treeb1c5fcf07e6587e48955b479d807c4b72d103066 /src/H5Gname.c
parent692fa69934553e34a7166fd919b90309bc4ecb23 (diff)
downloadhdf5-d91625d1392bfccdc500b151444030a05a639675.zip
hdf5-d91625d1392bfccdc500b151444030a05a639675.tar.gz
hdf5-d91625d1392bfccdc500b151444030a05a639675.tar.bz2
[svn-r23238] Description:
Bring changes from Coverity branch to trunk: r20528: Purpose: Fix coverity issue 1372 Description: Rewrite file open secition of H5FD_stdio_open to avoid TOCTUO condition. No longer calls access, and uses a tentative open in "rb" or "rb+" mode to check for existence of the file. r20609: Use HDstrncpy and HDstrncat. --gh r20611: Use HDstrncpy. --gh Tested on: Mac OSX/64 10.8.2 (amazon) w/debug, C++ & FORTRAN (h5committest not required, already tested on branch)
Diffstat (limited to 'src/H5Gname.c')
-rw-r--r--src/H5Gname.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/H5Gname.c b/src/H5Gname.c
index 6619c86..72da498 100644
--- a/src/H5Gname.c
+++ b/src/H5Gname.c
@@ -764,7 +764,7 @@ H5G_name_move_path(H5RS_str_t **path_r_ptr, const char *full_suffix, const char
/* Create the new path */
if(path_prefix2_len > 0) {
- HDstrncpy(new_path, path_prefix2, path_prefix2_len);
+ HDstrncpy(new_path, path_prefix2, path_prefix2_len + 1);
HDstrncpy(new_path + path_prefix2_len, dst_suffix, dst_suffix_len + 1);
} /* end if */
else