]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Suppress coverity warning about overflowing in safe_mem_is_zero
authorNick Mathewson <nickm@torproject.org>
Thu, 21 Aug 2014 14:44:13 +0000 (10:44 -0400)
committerNick Mathewson <nickm@torproject.org>
Thu, 21 Aug 2014 15:22:42 +0000 (11:22 -0400)
The unsigned underflow here is defined and intentional.

CID 202482

src/common/di_ops.c

index f03b2b75ecf8f19b065b4c60dcd28a3a6ef869ac..a8bfd025327652b674b225486cd28123fc60cf60 100644 (file)
@@ -218,6 +218,7 @@ safe_mem_is_zero(const void *mem, size_t sz)
     total |= *ptr++;
   }
 
+  /*coverity[overflow]*/
   return 1 & ((total - 1) >> 8);
 }