ndis(4): Avoid overflow.

This is a long standing problem: our random() function returns an
unsigned integer but the rand provided by ndis(4) returns an int.
Scale it down.

MFC after:	2 weeks
This commit is contained in:
Pedro F. Giffuni 2016-05-21 17:52:44 +00:00
parent 0e6d3c6d16
commit c515200599

View File

@ -3189,7 +3189,7 @@ static int
rand(void)
{
return (random());
return (random() / 2 + 1);
}
static void