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:
parent
e0f6fb692e
commit
334d424627
@ -3189,7 +3189,7 @@ static int
|
||||
rand(void)
|
||||
{
|
||||
|
||||
return (random());
|
||||
return (random() / 2 + 1);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user