rtspsrc: check for NULL before doing strcmp

Check the connection and address type for NULL before doing strcmp and
crashing.

Fixes #612553
This commit is contained in:
Wim Taymans 2010-03-11 12:56:11 +01:00
parent 2d16c09db8
commit d29fa60f97

View file

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