mirror of git://anongit.mindrot.org/openssh.git
- (djm) [openbsd-compat/bindresvport.c] Use arc4random_uniform(range)
instead of (arc4random() % range)
This commit is contained in:
parent
d925dcd8a5
commit
d89745b9e7
|
@ -1,3 +1,7 @@
|
||||||
|
20101204
|
||||||
|
- (djm) [openbsd-compat/bindresvport.c] Use arc4random_uniform(range)
|
||||||
|
instead of (arc4random() % range)
|
||||||
|
|
||||||
20101201
|
20101201
|
||||||
- OpenBSD CVS Sync
|
- OpenBSD CVS Sync
|
||||||
- deraadt@cvs.openbsd.org 2010/11/20 05:12:38
|
- deraadt@cvs.openbsd.org 2010/11/20 05:12:38
|
||||||
|
|
|
@ -89,7 +89,7 @@ bindresvport_sa(int sd, struct sockaddr *sa)
|
||||||
|
|
||||||
port = ntohs(*portp);
|
port = ntohs(*portp);
|
||||||
if (port == 0)
|
if (port == 0)
|
||||||
port = (arc4random() % NPORTS) + STARTPORT;
|
port = arc4random_uniform(NPORTS) + STARTPORT;
|
||||||
|
|
||||||
/* Avoid warning */
|
/* Avoid warning */
|
||||||
error = -1;
|
error = -1;
|
||||||
|
|
Loading…
Reference in New Issue