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

21 Aug
2014
21 Aug
'14
4:14 p.m.
commit 917e1042f75e9db2836def41210fa756c8ca3a85 Author: Nick Mathewson <nickm@torproject.org> 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); }
4033
Age (days ago)
4033
Last active (days ago)
0 comments
1 participants
participants (1)
-
nickm@torproject.org