[vlc-devel] [PATCH 3/3] access/satip: check return-value of vlc_uri_compose

Filip Roséen filip at atch.se
Thu Mar 2 19:37:37 CET 2017


vlc_uri_compose might fail and return NULL, meaning that we should
abort further processing if this happens (as it does not make sense to
continue).
---
 modules/access/satip.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/access/satip.c b/modules/access/satip.c
index 65c9e719b1..71028c2e64 100644
--- a/modules/access/satip.c
+++ b/modules/access/satip.c
@@ -688,6 +688,9 @@ static int satip_open(vlc_object_t *obj)
     }
 
     char *psz_setup_url = vlc_uri_compose(&setup_url);
+    if( psz_setup_url == NULL )
+        goto error;
+
     if (multicast) {
         net_Printf(access, sys->tcp_sock,
                 "SETUP %s RTSP/1.0\r\n"
-- 
2.12.0



More information about the vlc-devel mailing list