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

Re: [tor-bugs] #14478 [Tor]: Zero length keys test improvements



#14478: Zero length keys test improvements
-----------------------------+--------------------------------
     Reporter:  cypherpunks  |      Owner:
         Type:  enhancement  |     Status:  needs_review
     Priority:  normal       |  Milestone:  Tor: 0.2.6.x-final
    Component:  Tor          |    Version:  Tor: unspecified
   Resolution:               |   Keywords:
Actual Points:               |  Parent ID:
       Points:               |
-----------------------------+--------------------------------

Comment (by nickm):

 Replying to [comment:6 Sebastian]:
 > The issue about undefined behaviour I don't quite get. Is one really
 supposed to use -a only with variables? is [ -s $a -a b ] really
 unspecified behaviour?

 It doesn't work with old or weird shells, `test -s "$a" && test -s "$b"`
 is a little more portable.

 >Replying to [comment:7 Sebastian]:
 >Hrm, I'm not seeing how we can do any kind of sane checking of the string
 returned by mktemp. If the command invocation fails and it is empty, I am
 returning an error and a log message. I don't see how this could go wrong
 except by mktemp having a bug and returning a random directory, which we
 can't defend against afaict.

 Okay, I guess that's probably fine.  Better make sure it's a directory
 too, and we should be okay.

 I think this new thing won't work though:  `trap "rm -rf "$DATA_DIR"" 0` .
 Double-quotes don't really nest that way.  Try running this with TMPDIR
 set to something with a space in it to test?

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