rtspsrc: check for NULL before doing strcmp
authorWim Taymans <wim.taymans@collabora.co.uk>
Thu, 11 Mar 2010 11:56:11 +0000 (12:56 +0100)
committerWim Taymans <wim.taymans@collabora.co.uk>
Thu, 11 Mar 2010 11:56:11 +0000 (12:56 +0100)
Check the connection and address type for NULL before doing strcmp and
crashing.

Fixes #612553

gst/rtsp/gstrtspsrc.c

index 3048bd2..59302b1 100644 (file)
@@ -808,7 +808,10 @@ static void
 gst_rtspsrc_do_stream_connection (GstRTSPSrc * src, GstRTSPStream * stream,
     const GstSDPConnection * conn)
 {
-  if (strcmp (conn->nettype, "IN") != 0)
+  if (conn->nettype == NULL || strcmp (conn->nettype, "IN") != 0)
+    return;
+
+  if (conn->addrtype == NULL)
     return;
 
   /* check for IPV6 */