[tor-bugs] #2324 [Tor Client]: realloc should check SIZE_T_CEILING too?

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Wed Jan 5 09:08:30 UTC 2011


#2324: realloc should check SIZE_T_CEILING too?
-------------------------+--------------------------------------------------
  Reporter:  arma        |       Owner:                    
      Type:  defect      |      Status:  needs_review      
  Priority:  major       |   Milestone:  Tor: 0.2.1.x-final
 Component:  Tor Client  |     Version:  Tor: 0.2.1.26     
Resolution:              |    Keywords:                    
    Parent:              |  
-------------------------+--------------------------------------------------

Comment(by cypherpunks):

 Replying to [comment:5 nickm]:
 > See bug2324_uncompress in my public repository.

 {{{
 if (out_size > SIZE_T_CEILING || out_size > UINT_MAX)
 }}}
 then it must be
 {{{
 if (out_size >= SIZE_T_CEILING || out_size > UINT_MAX)
 }}}

 {{{
 #define MAX_UNCOMPRESSION_FACTOR 25
 }}}
 Why 25? Why not 20, 30? How it was calculated?

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/2324#comment:6>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list