Commit 8d4aaa8e authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

network: fix negative time-outs

parent 10bad27b
......@@ -178,6 +178,8 @@ int net_Connect( vlc_object_t *p_this, const char *psz_host, int i_port,
if (deadline != VLC_TS_INVALID)
{
ms = (deadline - mdate()) / (CLOCK_FREQ / 1000);
if (ms < 0)
ms = 0;
if (ms > INT_MAX)
ms = INT_MAX;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment