diff options
author | ShyamsundarR <srangana@redhat.com> | 2018-11-07 15:17:55 -0500 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2018-11-08 07:40:40 +0000 |
commit | 3056419608d5e1835d41612e09b56511d0f9a101 (patch) | |
tree | 68e4a64eb3a495761366c9cd0848886a64fbafa9 | |
parent | a907e468e724c32b9833ce59806fc215c7122d63 (diff) |
coverity: ignore tainted access reported in gf_free
Earlier commit had the annotation incorrect, and also did not
wrap the sanitization in a separate function. (see commit 39a1db1)
The issues are corrected in this patch, and also a coverity
stand alone run has been tested to ensure the annotations are
respected by coverity.
Change-Id: I4a93b6981e2ff4bba9a29e590b17da248931c8ae
Updates: bz#789278
Signed-off-by: ShyamsundarR <srangana@redhat.com>
-rw-r--r-- | libglusterfs/src/mem-pool.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libglusterfs/src/mem-pool.c b/libglusterfs/src/mem-pool.c index caf8bf2fa0c..16e413e22f2 100644 --- a/libglusterfs/src/mem-pool.c +++ b/libglusterfs/src/mem-pool.c @@ -309,7 +309,12 @@ If the pointer is accessed outside the scope of this function without any checks on content read from an IO operation, taints will still be reported, and needs appropriate addressing. */ -/* coverity[ +tainted_string_sanitize_content : arg-0 ] */ +/* coverity[ +tainted_data_sanitize : arg-0 ] */ +static void +gf_free_sanitize(void *s) +{ +} + void __gf_free(void *free_ptr) { @@ -325,6 +330,7 @@ __gf_free(void *free_ptr) if (!free_ptr) return; + gf_free_sanitize(free_ptr); ptr = free_ptr - GF_MEM_HEADER_SIZE; header = (struct mem_header *)ptr; |