From fa243654cf85c517db5efcce11cb4df06b9b119a Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Mon, 3 Apr 2017 15:05:47 +1000 Subject: [PATCH] sdp/message: fix segfault copying NULL in the boxed copy impl Allows passing NULL as a value to g_object_set and as signal parameters without crashing. --- gst-libs/gst/sdp/gstsdpmessage.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gst-libs/gst/sdp/gstsdpmessage.c b/gst-libs/gst/sdp/gstsdpmessage.c index c3a11ad888..df6139ac6a 100644 --- a/gst-libs/gst/sdp/gstsdpmessage.c +++ b/gst-libs/gst/sdp/gstsdpmessage.c @@ -170,6 +170,9 @@ gst_sdp_message_boxed_copy (GstSDPMessage * orig) { GstSDPMessage *copy; + if (!orig) + return NULL; + if (gst_sdp_message_copy (orig, ©) == GST_SDP_OK) return copy;