[tor-bugs] #5557 [Tor Bridge]: Tor helpers' launch error message contains useless whitespace

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Wed May 9 10:07:55 UTC 2012


#5557: Tor helpers' launch error message contains useless whitespace
------------------------+---------------------------------------------------
 Reporter:  asn         |          Owner:                    
     Type:  defect      |         Status:  new               
 Priority:  normal      |      Milestone:  Tor: 0.2.3.x-final
Component:  Tor Bridge  |        Version:                    
 Keywords:              |         Parent:                    
   Points:              |   Actualpoints:                    
------------------------+---------------------------------------------------

Comment(by asn):

 Replying to [comment:5 sjmurdoch]:
 > I agree on the aesthetics point, but does this actually cause a bug in
 log_from_pipe? SPAWN_ERROR_MESSAGE has a trailing space, and the MacOS X
 manpage says "The format string may also contain other characters.  White
 space (such as blanks, tabs, or newlines) in the format string match any
 amount of white space, including none, in the input." Can we not assume
 this on all platforms?

 `tor_sscanf()` doesn't support the whitespace trick. In `tor_vsscanf()` we
 have:
 {{{
     if (*pattern != '%') {
       if (*buf == *pattern) {
         ++buf;
         ++pattern;
         continue;
       } else {
         return n_matched;
       }
 }}}

 Not sure if this is a design choice or a bug.

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


More information about the tor-bugs mailing list