aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-04-09 13:14:28 -0400
committerteor <teor@torproject.org>2019-08-10 07:16:42 +1000
commit37bd7fa50d0901a87084b71299cc8c8786cd1cd8 (patch)
tree40baf2e49d0ce48a4238849a567b16e83862d9b2
parentc10011532e524846bce300a791f51f298b223f6a (diff)
downloadtor-37bd7fa50d0901a87084b71299cc8c8786cd1cd8.tar.gz
tor-37bd7fa50d0901a87084b71299cc8c8786cd1cd8.zip
Modify "Protect buffers against INT_MAX datalen overflows." for 0.2.9
-rw-r--r--src/or/buffers.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/or/buffers.c b/src/or/buffers.c
index 394ba0ccb8..b36e4ab509 100644
--- a/src/or/buffers.c
+++ b/src/or/buffers.c
@@ -394,10 +394,6 @@ buf_free(buf_t *buf)
{
if (!buf)
return;
- if (BUG(buf_out->datalen >= INT_MAX || buf_in->datalen >= INT_MAX))
- return;
- if (BUG(buf_out->datalen >= INT_MAX - buf_in->datalen))
- return;
buf_clear(buf);
buf->magic = 0xdeadbeef;
@@ -2067,4 +2063,3 @@ assert_buf_ok(buf_t *buf)
tor_assert(buf->datalen == total);
}
}
-