[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/release-0.4.1] Modify "Protect buffers against INT_MAX datalen overflows." for 0.2.9



commit 37bd7fa50d0901a87084b71299cc8c8786cd1cd8
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Tue Apr 9 13:14:28 2019 -0400

    Modify "Protect buffers against INT_MAX datalen overflows." for 0.2.9
---
 src/or/buffers.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/src/or/buffers.c b/src/or/buffers.c
index 394ba0ccb..b36e4ab50 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);
   }
 }
-



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits