summaryrefslogtreecommitdiff
path: root/gst-libs
diff options
context:
space:
mode:
authorWim Taymans <wtaymans@redhat.com>2014-04-08 15:43:50 +0200
committerWim Taymans <wtaymans@redhat.com>2014-04-08 15:59:47 +0200
commit4a81605d02fa2dc2b7276bc72007d6a8920f04a3 (patch)
tree9c8c440aa62a9914e0d11d8042bd96f84bacc59a /gst-libs
parent6954d2167cf215907138983b99e443eae6b4d315 (diff)
sdp: guard against address parse errors.
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/gst/sdp/gstsdpmessage.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gst-libs/gst/sdp/gstsdpmessage.c b/gst-libs/gst/sdp/gstsdpmessage.c
index 5582ab755e..844819966e 100644
--- a/gst-libs/gst/sdp/gstsdpmessage.c
+++ b/gst-libs/gst/sdp/gstsdpmessage.c
@@ -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);