pidgin: cc913e6e: media: Fix a NULL pointer deref crash, a...
darkrain42 at pidgin.im
darkrain42 at pidgin.im
Wed May 11 21:25:44 EDT 2011
----------------------------------------------------------------------
Revision: cc913e6ec579f0d81db827c23a13146779b9ca3c
Parent: aad06bbf6f9a5e7fd1f16c72be4af2060e8de4c3
Author: darkrain42 at pidgin.im
Date: 05/11/11 21:21:50
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/cc913e6ec579f0d81db827c23a13146779b9ca3c
Changelog:
media: Fix a NULL pointer deref crash, and add diagnostic logging.
I'm not entirely sure that just short-circuiting error handling in this
case is correct (in fact I suspect it's not), but it's certainly better
than a crash, and now there's detail on the actual error.
Closes #14033
Changes against parent aad06bbf6f9a5e7fd1f16c72be4af2060e8de4c3
patched libpurple/media/backend-fs2.c
-------------- next part --------------
============================================================
--- libpurple/media/backend-fs2.c d35ff3fcd4005cef61707bbd247426e17dfcec25
+++ libpurple/media/backend-fs2.c 571f978c7bcef42225c6f74c221559d9a076c78e
@@ -1081,6 +1081,22 @@ gst_handle_message_error(GstBus *bus, Gs
GstElement *lastElement = NULL;
GList *sessions;
+ GError *error = NULL;
+ gchar *debug_msg = NULL;
+
+ gst_message_parse_error(msg, &error, &debug_msg);
+ purple_debug_error("backend-fs2", "gst error %s\ndebugging: %s\n",
+ error->message, debug_msg);
+
+ g_error_free(error);
+ g_free(debug_msg);
+
+ /* Not entirely sure this is correct, but prevents a
+ * NULL deref crash.
+ */
+ if (!element)
+ return;
+
while (!GST_IS_PIPELINE(element)) {
if (element == priv->confbin)
break;
More information about the Commits
mailing list