[vlc-commits] network: fix negative time-outs
Rémi Denis-Courmont
git at videolan.org
Mon Nov 6 20:55:21 CET 2017
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Nov 6 21:54:52 2017 +0200| [8d4aaa8e2756c5ff8e3c9c30655b3b5ad6fcef8c] | committer: Rémi Denis-Courmont
network: fix negative time-outs
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8d4aaa8e2756c5ff8e3c9c30655b3b5ad6fcef8c
---
src/network/tcp.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/network/tcp.c b/src/network/tcp.c
index bc2a116532..01e80844d5 100644
--- a/src/network/tcp.c
+++ b/src/network/tcp.c
@@ -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;
}
More information about the vlc-commits
mailing list