[tor-bugs] #5558 [Tor Client]: tor_vsscanf() returns -1 if '%%' doesn't match a '%'.

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Tue Apr 3 13:03:23 UTC 2012


#5558: tor_vsscanf() returns -1 if '%%' doesn't match a '%'.
------------------------+---------------------------------------------------
 Reporter:  asn         |          Owner:                    
     Type:  defect      |         Status:  new               
 Priority:  normal      |      Milestone:  Tor: 0.2.3.x-final
Component:  Tor Client  |        Version:                    
 Keywords:  easy        |         Parent:                    
   Points:              |   Actualpoints:                    
------------------------+---------------------------------------------------
 `tor_vsscanf()` returns -1 if '%%' doesn't match a '%', but
 `tor_vsscanf()` is supposed to return -1 only on malformed patterns.

 `tor_vsscanf()` should return `n_matched` in this case.

 {{{
       } else if (*pattern == '%') {
         if (*buf != '%')
           return -1;
         ++buf;
         ++pattern;
 }}}

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


More information about the tor-bugs mailing list