Skip to content
Snippets Groups Projects
Unverified Commit 37bd7fa5 authored by Nick Mathewson's avatar Nick Mathewson :game_die: Committed by teor
Browse files

Modify "Protect buffers against INT_MAX datalen overflows." for 0.2.9

parent c1001153
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment