[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #1929 [Tor Client]: Setting *Nodes config options more than once means last entry is used



#1929: Setting *Nodes config options more than once means last entry is used
------------------------+---------------------------------------------------
 Reporter:  Sebastian   |       Owner:                    
     Type:  defect      |      Status:  needs_review      
 Priority:  minor       |   Milestone:  Tor: 0.2.2.x-final
Component:  Tor Client  |     Version:                    
 Keywords:              |      Parent:                    
------------------------+---------------------------------------------------

Comment(by nickm):

 I tweaked it in branch continuation in my repository.

 I think, among other things, I removed a condition where we could run off
 the end of the string.  When you did:
 {{{
  } else if (*line == '#') {
    do {
      ++line;
    } while (*line && *line != '\n')
  }
  ++line; // OOPS
 }}}
 consider what would happen when the last line in the file had a comment
 with no newline at the end.  The loop would continue until *line=='\0',
 and then the second increment (marked "OOPS" above) would advance the line
 one more character.  Ouch!

 And a completely cosmetic thing: It seems odd to day "Implements bug
 1929".  Implementing a bug sounds like you're putting it _into_ the code.
 Since this is really a feature rather than a bugfix, I'm going with
 "resolves bug 1929", but "resolves ticket 1929" would also sound ok to me.

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/1929#comment:9>
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