mirror of
https://github.com/json-c/json-c.git
synced 2026-04-05 13:29:06 +08:00
Merge pull request #662 from stoeckmann/random
Prevent signed overflow in get_time_seed
This commit is contained in:
@@ -305,7 +305,7 @@ static int get_time_seed(void)
|
|||||||
{
|
{
|
||||||
DEBUG_SEED("get_time_seed");
|
DEBUG_SEED("get_time_seed");
|
||||||
|
|
||||||
return (int)time(NULL) * 433494437;
|
return (unsigned)time(NULL) * 433494437;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* json_c_get_random_seed */
|
/* json_c_get_random_seed */
|
||||||
|
|||||||
Reference in New Issue
Block a user