Impose maximum sizes on parsed objects

An object, you'll recall, is something between -----BEGIN----- and
-----END----- tags in a directory document.  Some of our code, as
doorss has noted in bug 2352, could assert if one of these ever
overflowed SIZE_T_CEILING but not INT_MAX.  As a solution, I'm setting
a maximum size on a single object such that neither of these limits
will ever be hit.  I'm also fixing the INT_MAX checks, just to be sure.
This commit is contained in:
Nick Mathewson
2011-01-10 12:12:11 -05:00
parent 729f404efe
commit 373a1bc40e
2 changed files with 15 additions and 2 deletions
+6
View File
@@ -0,0 +1,6 @@
o Minor bugfixes
- Fix some potential asserts and partsing issues with grossly
malformed router caches. Fixes bug 2352. Found by doorss.
Bugfix on Tor 0.2.1.27.