commit eca9b3424d4cb166ecaa781a8d32f840912a97a1 Author: Nick Mathewson nickm@torproject.org Date: Thu Mar 16 15:14:16 2017 -0400
consdiff: Fix 32-bit compilation.
Thanks, jenkins! --- src/or/consdiff.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/or/consdiff.c b/src/or/consdiff.c index 13b267f..d2a2af1 100644 --- a/src/or/consdiff.c +++ b/src/or/consdiff.c @@ -391,7 +391,8 @@ get_id_hash(const cdline_t *line, cdline_t *hash_out)
hash_out->s = hash; /* Always true because lines are limited to this length */ - tor_assert(hash_end - hash <= UINT32_MAX); + tor_assert(hash_end >= hash); + tor_assert((size_t)(hash_end - hash) <= UINT32_MAX); hash_out->len = (uint32_t)(hash_end - hash);
return 0;
tor-commits@lists.torproject.org