sdp: guard against address parse errors.
authorWim Taymans <wtaymans@redhat.com>
Tue, 8 Apr 2014 13:43:50 +0000 (15:43 +0200)
committerWim Taymans <wtaymans@redhat.com>
Tue, 8 Apr 2014 13:59:47 +0000 (15:59 +0200)
gst-libs/gst/sdp/gstsdpmessage.c

index 5582ab7..8448199 100644 (file)
@@ -436,7 +436,10 @@ gst_sdp_address_is_multicast (const gchar * nettype, const gchar * addrtype,
   if (nettype && strcmp (nettype, "IN") != 0)
     return FALSE;
 
-  iaddr = g_inet_address_new_from_string (addr);
+  /* guard against parse failures */
+  if ((iaddr = g_inet_address_new_from_string (addr)) == NULL)
+    return FALSE;
+
   ret = g_inet_address_get_is_multicast (iaddr);
   g_object_unref (iaddr);