Fix a rare bug in rend_fn tests when the randomly generated port is 0
commitf060b18e6c4292be58de0e1b08f25b770cbddff8
authorNick Mathewson <nickm@torproject.org>
Sat, 7 Aug 2010 18:31:58 +0000 (7 14:31 -0400)
committerNick Mathewson <nickm@torproject.org>
Sat, 7 Aug 2010 18:31:58 +0000 (7 14:31 -0400)
tree586dd6124e004b093682ddeea3b8c27a7000b483
parent93edf0cb6c01a3d861c3147a3a9d3f63f8f80aad
Fix a rare bug in rend_fn tests when the randomly generated port is 0

Since the rend code doesn't like the port to be 0, we shouldn't generate
the port by declaring crypto_rand_int(65536); instead we should
say crypto_rand_int(65535)+1.

Diagnosed by Matt Edman; fixes bug 1808.
src/test/test.c