mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 13:43:47 +01:00
Add a check and a cast in rephist.c to fix a warning
This commit is contained in:
parent
b2cb3c33ac
commit
9f5b71a7ca
@ -1828,7 +1828,11 @@ predicted_ports_prediction_time_remaining(time_t now)
|
|||||||
if (idle_delta > prediction_timeout)
|
if (idle_delta > prediction_timeout)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return prediction_timeout - idle_delta;
|
if (BUG((prediction_timeout - idle_delta) > INT_MAX)) {
|
||||||
|
return INT_MAX;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (int)(prediction_timeout - idle_delta);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** We just got an application request for a connection with
|
/** We just got an application request for a connection with
|
||||||
|
Loading…
Reference in New Issue
Block a user