diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2011-02-08 21:40:24 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2011-02-08 21:40:24 (GMT) |
commit | 84ef7b0ad231923273dd5a1d9612e5d5f271968c (patch) | |
tree | db7b3b37855c1ab9901fac063f84279393cb0dc8 /tools/lib | |
parent | 20b58606caaff62d70a7bdfc03dcead16e1e30d4 (diff) | |
download | hdf5-84ef7b0ad231923273dd5a1d9612e5d5f271968c.zip hdf5-84ef7b0ad231923273dd5a1d9612e5d5f271968c.tar.gz hdf5-84ef7b0ad231923273dd5a1d9612e5d5f271968c.tar.bz2 |
[svn-r20066] Description:
Bring r20065 from trunk to 1.8 branch:
Bring changes from Coverity branch to trunk:
r19975:
Fixed potential mem leak at H5O_attr_open_by_name
r19980:
Fix coverity issue 792.
Free tmp_env_prefix in H5Lexternal.c line 365 if it is not NULL but its contents are 0 when it goes out of scope.
r20039:
Eliminate warnings about nested extern and implicit declarations of parallel_print and address Coverity defects 712-781 by #including h5tools_utils.h in h5diff_array.c, h5diff_attr.c, h5diff_dset.c and h5diff_util.c.
r20046:
Purpose: Address TOCTOU warnings in h5jam and h5unjam
Description: Coverity is afraid that the state of the input file could change
between the call to stat() and the call to open(). This is called a time-of-
check time-of-use (TOCTOU) vulnerability. Modified stat calls to fstat which
uses an open file pointer so it (hopefully) won't complain any more.
r20047:
Addressed coverity issues 135-137, 462-464. Local pointers that needed to be freed in case of error were moved out of a switch statement in src/H5Tnative.c, set to NULL, and checked before freeing.
Tested on:
Mac OS X/32 10.6.6 (amazon) w/debug & production
(h5committested on Coverity branch)
Diffstat (limited to 'tools/lib')
-rw-r--r-- | tools/lib/h5diff.c | 5 | ||||
-rw-r--r-- | tools/lib/h5diff_array.c | 12 | ||||
-rw-r--r-- | tools/lib/h5diff_attr.c | 4 | ||||
-rw-r--r-- | tools/lib/h5diff_dset.c | 5 | ||||
-rw-r--r-- | tools/lib/h5diff_util.c | 5 |
5 files changed, 18 insertions, 13 deletions
diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c index 640a20a..5f406cf 100644 --- a/tools/lib/h5diff.c +++ b/tools/lib/h5diff.c @@ -14,11 +14,12 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include <stdlib.h> + #include "H5private.h" -#include "h5diff.h" -#include "ph5diff.h" #include "h5tools.h" #include "h5tools_utils.h" +#include "h5diff.h" +#include "ph5diff.h" /* * Debug printf macros. The prefix allows output filtering by test scripts. diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c index 482f9bd..1c2cfa9 100644 --- a/tools/lib/h5diff_array.c +++ b/tools/lib/h5diff_array.c @@ -14,15 +14,15 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include <math.h> -#include "h5diff.h" -#include "ph5diff.h" -#include "H5private.h" -#include "h5tools.h" - - #include <sys/timeb.h> #include <time.h> +#include "H5private.h" +#include "h5tools.h" +#include "h5tools_utils.h" +#include "h5diff.h" +#include "ph5diff.h" + /*------------------------------------------------------------------------- * printf formatting diff --git a/tools/lib/h5diff_attr.c b/tools/lib/h5diff_attr.c index ad6f45b..7e5fb04 100644 --- a/tools/lib/h5diff_attr.c +++ b/tools/lib/h5diff_attr.c @@ -13,9 +13,11 @@ * access to either file, you may request a copy from help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +#include "H5private.h" #include "h5tools.h" +#include "h5tools_utils.h" #include "h5diff.h" -#include "H5private.h" + /*------------------------------------------------------------------------- * Function: diff_attr diff --git a/tools/lib/h5diff_dset.c b/tools/lib/h5diff_dset.c index 0f482b6..f8fc493 100644 --- a/tools/lib/h5diff_dset.c +++ b/tools/lib/h5diff_dset.c @@ -13,10 +13,11 @@ * access to either file, you may request a copy from help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include "h5diff.h" -#include "ph5diff.h" #include "H5private.h" #include "h5tools.h" +#include "h5tools_utils.h" +#include "h5diff.h" +#include "ph5diff.h" /*------------------------------------------------------------------------- diff --git a/tools/lib/h5diff_util.c b/tools/lib/h5diff_util.c index bc127a2..48e0ecb 100644 --- a/tools/lib/h5diff_util.c +++ b/tools/lib/h5diff_util.c @@ -13,10 +13,11 @@ * access to either file, you may request a copy from help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include "h5diff.h" -#include "ph5diff.h" #include "H5private.h" #include "h5tools.h" +#include "h5tools_utils.h" +#include "h5diff.h" +#include "ph5diff.h" |