[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Suppress coverity warning about overflowing in safe_mem_is_zero



commit 917e1042f75e9db2836def41210fa756c8ca3a85
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Thu Aug 21 10:44:13 2014 -0400

    Suppress coverity warning about overflowing in safe_mem_is_zero
    
    The unsigned underflow here is defined and intentional.
    
    CID 202482
---
 src/common/di_ops.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/src/common/di_ops.c b/src/common/di_ops.c
index f03b2b7..a8bfd02 100644
--- a/src/common/di_ops.c
+++ b/src/common/di_ops.c
@@ -218,6 +218,7 @@ safe_mem_is_zero(const void *mem, size_t sz)
     total |= *ptr++;
   }
 
+  /*coverity[overflow]*/
   return 1 & ((total - 1) >> 8);
 }
 



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits