[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-bugs] #13635 [Tor]: Time to retire SIZE_T_CEILING?
#13635: Time to retire SIZE_T_CEILING?
--------------------+------------------------------------
Reporter: nickm | Owner:
Type: defect | Status: new
Priority: normal | Milestone: Tor: 0.2.6.x-final
Component: Tor | Version:
Keywords: | Actual Points:
Parent ID: | Points:
--------------------+------------------------------------
Back in a980446d, we added a maximum value for any size_t that we would
accept in tor_malloc() or tor_realloc(). If you pass those functions a
value greater than SSIZE_MAX - 16, we assume that you probably had an
integer underflow or something , and you need to hit an assertion.
But this check is silly, isn't it? malloc() will usually refuse to give
you that much memory, and our post-malloc assertion will catch it. On the
other hand, if malloc _would_ give you that much memory, then who are we
to argue with it?
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/13635>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs