mirror of
https://github.com/json-c/json-c.git
synced 2026-11-10 16:00:14 +08:00
Merge pull request #662 from stoeckmann/random
Prevent signed overflow in get_time_seed
This commit is contained in:
1 file changed
+1
-1
+1
-1
@@ -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