From 9f9422bcb39277138e4f5825493fb4851e6c751d Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Fri, 30 May 2008 07:36:17 +0000 Subject: [PATCH] gst/gstregistry.c: Don't recurse into .debug directories as some distros install the debugging symbols next to the pl... Original commit message from CVS: Patch by: Rob Bradford * gst/gstregistry.c: (gst_registry_scan_path_level): Don't recurse into .debug directories as some distros install the debugging symbols next to the plugins in .debug directories and dlopen() crashes on them sometimes. Fixes bug #508070. Add FIXME for 0.11 to not recurse into directories at all because it's very inconsistent to the behaviour of other PATH environment variables. --- ChangeLog | 13 +++++++++++++ gst/gstregistry.c | 10 ++++++++++ 2 files changed, 23 insertions(+) diff --git a/ChangeLog b/ChangeLog index 215ff72b27..4249d913cf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2008-05-30 Sebastian Dröge + + Patch by: Rob Bradford + + * gst/gstregistry.c: (gst_registry_scan_path_level): + Don't recurse into .debug directories as some distros install + the debugging symbols next to the plugins in .debug directories + and dlopen() crashes on them sometimes. Fixes bug #508070. + + Add FIXME for 0.11 to not recurse into directories at all because + it's very inconsistent to the behaviour of other PATH environment + variables. + 2008-05-29 Wim Taymans * libs/gst/base/gstbasesink.c: (gst_base_sink_get_sync_times), diff --git a/gst/gstregistry.c b/gst/gstregistry.c index 828ff76014..045703672c 100644 --- a/gst/gstregistry.c +++ b/gst/gstregistry.c @@ -812,6 +812,16 @@ gst_registry_scan_path_level (GstRegistry * registry, const gchar * path, filename = g_strjoin ("/", path, dirent, NULL); if (g_file_test (filename, G_FILE_TEST_IS_DIR)) { + /* skip the .debug directory, these contain elf files that are not + * useful or worse, can crash dlopen () */ + if (g_str_equal (dirent, ".debug")) { + GST_LOG_OBJECT (registry, "found .debug directory, ignoring"); + g_free (filename); + continue; + } + /* FIXME 0.11: Don't recurse into directories, this behaviour + * is inconsistent with other PATH environment variables + */ if (level > 0) { GST_LOG_OBJECT (registry, "recursing into directory %s", filename); changed |= gst_registry_scan_path_level (registry, filename, level - 1);