From eca9b3424d4cb166ecaa781a8d32f840912a97a1 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Thu, 16 Mar 2017 15:14:16 -0400 Subject: 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 13b267f4a0..d2a2af1b5f 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; -- cgit v1.2.3-54-g00ecf