mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-12 11:26:39 +00:00
dtlsconnection: Fix overflow in timeout calculation on systems with 32 bit time_t
If a timeout of more than 4295s was scheduled, the calculation would overflow and a too short timeout would be used instead. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6923>
This commit is contained in:
parent
decc5af69f
commit
85c838d881
1 changed files with 1 additions and 1 deletions
|
@ -449,7 +449,7 @@ gst_dtls_connection_check_timeout_locked (GstDtlsConnection * self)
|
|||
priv = self->priv;
|
||||
|
||||
if (DTLSv1_get_timeout (priv->ssl, &timeout)) {
|
||||
wait_time = timeout.tv_sec * G_USEC_PER_SEC + timeout.tv_usec;
|
||||
wait_time = ((gint64) timeout.tv_sec) * G_USEC_PER_SEC + timeout.tv_usec;
|
||||
|
||||
GST_DEBUG_OBJECT (self, "waiting for %" G_GINT64_FORMAT " usec", wait_time);
|
||||
if (wait_time) {
|
||||
|
|
Loading…
Reference in a new issue