[tor-bugs] #3607 [Tor Client]: Assertion failure in start_writing_to_file

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Tue Jul 19 16:54:08 UTC 2011


#3607: Assertion failure in start_writing_to_file
------------------------+---------------------------------------------------
 Reporter:  Morbid      |          Owner:  rransom           
     Type:  defect      |         Status:  needs_review      
 Priority:  major       |      Milestone:  Tor: 0.2.2.x-final
Component:  Tor Client  |        Version:                    
 Keywords:              |         Parent:                    
   Points:              |   Actualpoints:                    
------------------------+---------------------------------------------------

Comment(by rransom):

 Replying to [comment:8 nickm]:
 > I've made a "bug3607" branch and tweaked the changes file a little bit
 so that it doesn't have a huge list between "write several files" and "in
 text mode".

 Looks good!

 > I was a little worried in some places that we might be write something
 in text mode and then later read it in binary mode, but I think we're in
 the clear: when we read the client-keys file, we do so in text mode.  We
 never read the files written in geoip.c, or the hostname file, or the
 buffer-stats file.
 >
 > One thing, though: is it right to make the stuff in tor-gencert in text
 mode?  I think that when we load and parse certificates, we assume that
 they're stored in LF mode.  Better check this.  (This doesn't matter too
 much, since there is no way we're having an authority op who makes signing
 keys on windows, but it would be nice to get it right for testing.)

 Keys are read using `init_key_from_file`, which calls
 `crypto_pk_read_private_key_from_filename`, which calls `read_file_to_str`
 without the `RFTS_BIN` flag; thus, keys are read in text mode.  Whether
 this text mode expects CRLF or LF line endings is OS-dependent.

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


More information about the tor-bugs mailing list