]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Suppress coverity warning about overflowing in tor_memeq.
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 14:44:13 +0000 (10:44 -0400)
The unsigned underflow here is defined and intentional.

CID 202482

src/common/di_ops.c

index 14a1443400233e19599205c0a5d2d0b14d3847ed..f03b2b75ecf8f19b065b4c60dcd28a3a6ef869ac 100644 (file)
@@ -130,6 +130,7 @@ tor_memeq(const void *a, const void *b, size_t sz)
    *            1 & ((any_difference - 1) >> 8) == 0
    */
 
+  /*coverity[overflow]*/
   return 1 & ((any_difference - 1) >> 8);
 }