Commit 9a613134 authored by Filip Roséen's avatar Filip Roséen Committed by Jean-Baptiste Kempf
Browse files

access/satip: add missing initialization of sys->tcp_sock



As the object referred to by sys is allocated with calloc,
sys->tcp_sock will be equal to 0 if an error occurs prior to it being
assigned a value in satip_open (such as when encountering a malformed
URI).

This will cause the error clean-up to assume that tcp->tcp_sock refers
to an open file-descriptor, triggering an assert if no suck
file-descriptor exists or closing a fd that access/satip definitely
should not mess with.

fixes: #18344
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent c93f8cab
......@@ -636,6 +636,7 @@ static int satip_open(vlc_object_t *obj)
sys->udp_sock = -1;
sys->rtcp_sock = -1;
sys->tcp_sock = -1;
/* convert url to lowercase, some famous m3u playlists for satip contain
* uppercase parameters while most (all?) satip servers do only understand
......
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