Skip to content
Snippets Groups Projects
Forked from The Tor Project / Core / Tor
Source project has a limited visibility.
  • Nick Mathewson's avatar
    373a1bc4
    Impose maximum sizes on parsed objects · 373a1bc4
    Nick Mathewson authored
    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.
    373a1bc4
    History
    Impose maximum sizes on parsed objects
    Nick Mathewson authored
    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.