diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-03-16 15:14:16 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-03-16 15:14:16 -0400 |
commit | eca9b3424d4cb166ecaa781a8d32f840912a97a1 (patch) | |
tree | 2ac7f2846c767477b3b632c4f1e4d7481109a6d3 | |
parent | af5628e7709cc403d6ba6a78d2dbed29809ffc9d (diff) | |
download | tor-eca9b3424d4cb166ecaa781a8d32f840912a97a1.tar.gz tor-eca9b3424d4cb166ecaa781a8d32f840912a97a1.zip |
consdiff: Fix 32-bit compilation.
Thanks, jenkins!
-rw-r--r-- | src/or/consdiff.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; |