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:
pfg 2016-05-21 17:52:44 +00:00
parent e0f6fb692e
commit 334d424627

View File

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