Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

never default to a low port when generating a cjdroute.conf

  • Loading branch information...
commit 992ecd0caaa07ad90507b5decce2d25ee6127d80 1 parent 1339606
Caleb James DeLisle authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 cjdroute.c
View
7 cjdroute.c
@@ -100,8 +100,11 @@ static int genconf()
uint8_t adminPassword[32];
randomBase32(adminPassword);
- uint16_t port;
- randombytes((uint8_t*) &port, 2);
+ uint16_t port = 0;
+ while (port <= 1024) {
+ randombytes((uint8_t*) &port, 2);
+ }
+
uint8_t publicKeyBase32[53];
uint8_t address[40];
uint8_t privateKeyHex[65];
Please sign in to comment.
Something went wrong with that request. Please try again.