summaryrefslogtreecommitdiffstats
path: root/src/H5T.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2013-02-25 14:48:42 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2013-02-25 14:48:42 (GMT)
commit0fc1c9c5197d9d762ef6753f299d6ad7221f72a8 (patch)
tree4d5e5e3c1b6ae426ab46137907af39d683e0054f /src/H5T.c
parent66ba0b4f3309188dfd8e9b5c969dcca0014b8526 (diff)
downloadhdf5-0fc1c9c5197d9d762ef6753f299d6ad7221f72a8.zip
hdf5-0fc1c9c5197d9d762ef6753f299d6ad7221f72a8.tar.gz
hdf5-0fc1c9c5197d9d762ef6753f299d6ad7221f72a8.tar.bz2
[svn-r23313] Description:
Bring changes from Coverity branch to the trunk: r20612: Changed string functions to versions with string length to fix coverity issues 922, 942 and 943. r20614: Use HDsnprintf. --gh r20675: Fix for coverity #1714 due to the fix for #810. Use HDfree() instead of H5MM_xfree(). r20678: Repaired coverity issue #598 -- failure to check return value from a call to fstat(), or to tidy up in the event of failure. r20679: Use HDstrncpy. --gh r20681: Use HDstrncat and HDstrncpy. --gh Tested on: Mac OSX/64 10.8.2 (amazon) w/Debug, etc. (too minor to require h5committest)
Diffstat (limited to 'src/H5T.c')
-rw-r--r--src/H5T.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/H5T.c b/src/H5T.c
index 5801c3f..65460ed 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -4389,7 +4389,7 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst, const char *name,
H5T_g.apaths = 128;
if(NULL == (H5T_g.path[0] = H5FL_CALLOC(H5T_path_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for no-op conversion path")
- HDstrcpy(H5T_g.path[0]->name, "no-op");
+ HDsnprintf(H5T_g.path[0]->name, sizeof(H5T_g.path[0]->name), "no-op");
H5T_g.path[0]->func = H5T__conv_noop;
H5T_g.path[0]->cdata.command = H5T_CONV_INIT;
if(H5T__conv_noop(FAIL, FAIL, &(H5T_g.path[0]->cdata), (size_t)0, (size_t)0, (size_t)0, NULL, NULL, dxpl_id) < 0) {
@@ -4457,7 +4457,7 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst, const char *name,
path->name[H5T_NAMELEN - 1] = '\0';
} /* end if */
else
- HDstrcpy(path->name, "NONAME");
+ HDsnprintf(path->name, sizeof(path->name), "NONAME");
if(NULL == (path->src = H5T_copy(src, H5T_COPY_ALL)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to copy datatype for conversion path")
if(NULL == (path->dst = H5T_copy(dst, H5T_COPY_ALL)))