diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-03-03 22:25:26 +0100 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-03-03 22:25:26 +0100 |
commit | 81a994ce77038721df3aa2f77b783db9a52da79e (patch) | |
tree | db02dd26457750787f644d2f9cdfeaa4cb9294cc /src/or/buffers.c | |
parent | 71ee53fe9bdf3f64eef9b38de55960185e8be1b5 (diff) | |
download | tor-81a994ce77038721df3aa2f77b783db9a52da79e.tar.gz tor-81a994ce77038721df3aa2f77b783db9a52da79e.zip |
Make the assert related to 15083 a tiny bit more tolerant
Diffstat (limited to 'src/or/buffers.c')
-rw-r--r-- | src/or/buffers.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/or/buffers.c b/src/or/buffers.c index 7976432793..9dfed007da 100644 --- a/src/or/buffers.c +++ b/src/or/buffers.c @@ -2483,7 +2483,14 @@ assert_buf_ok(buf_t *buf) total += ch->datalen; tor_assert(ch->datalen <= ch->memlen); tor_assert(ch->data >= &ch->mem[0]); - tor_assert(ch->data < &ch->mem[0]+ch->memlen); + tor_assert(ch->data <= &ch->mem[0]+ch->memlen); + if (ch->data == &ch->mem[0]+ch->memlen) { + static int warned = 0; + if (! warned) { + log_warn(LD_BUG, "Invariant violation in buf.c related to #15083"); + warned = 1; + } + } tor_assert(ch->data+ch->datalen <= &ch->mem[0] + ch->memlen); if (!ch->next) tor_assert(ch == buf->tail); |