[tor-commits] [tor/master] Update the buffer sentinel fix to work with our #20081 fix.

nickm at torproject.org nickm at torproject.org
Mon Oct 17 20:12:58 UTC 2016


commit 66ecdcdd7573f1dafbdb1e14a7ef375f04be812c
Author: Nick Mathewson <nickm at torproject.org>
Date:   Mon Oct 17 14:52:44 2016 -0400

    Update the buffer sentinel fix to work with our #20081 fix.
---
 src/or/buffers.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/or/buffers.c b/src/or/buffers.c
index a7b46bf..8981fd2 100644
--- a/src/or/buffers.c
+++ b/src/or/buffers.c
@@ -205,7 +205,7 @@ chunk_grow(chunk_t *chunk, size_t sz)
 STATIC size_t
 preferred_chunk_size(size_t target)
 {
-  tor_assert(target <= SIZE_T_CEILING - CHUNK_HEADER_LEN);
+  tor_assert(target <= SIZE_T_CEILING - CHUNK_OVERHEAD);
   if (CHUNK_ALLOC_SIZE(target) >= MAX_CHUNK_ALLOC)
     return CHUNK_ALLOC_SIZE(target);
   size_t sz = MIN_CHUNK_ALLOC;





More information about the tor-commits mailing list