mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-07 20:31:20 +00:00
registry: do quick check for . files
Do a quick check for . files before calling the strcmp functions
This commit is contained in:
parent
d833b39a85
commit
1be3d5cd83
1 changed files with 4 additions and 2 deletions
|
@ -950,8 +950,10 @@ gst_registry_scan_path_level (GstRegistryScanContext * context,
|
|||
|
||||
if (file_status.st_mode & S_IFDIR) {
|
||||
/* skip the .debug directory, these contain elf files that are not
|
||||
* useful or worse, can crash dlopen () */
|
||||
if (g_str_equal (dirent, ".debug") || g_str_equal (dirent, ".git")) {
|
||||
* useful or worse, can crash dlopen (). do a quick check for the . first
|
||||
* and then call the compare functions. */
|
||||
if (G_UNLIKELY (dirent[0] == '.' && (g_str_equal (dirent, ".debug")
|
||||
|| g_str_equal (dirent, ".git")))) {
|
||||
GST_LOG_OBJECT (context->registry, "ignoring .debug or .git directory");
|
||||
g_free (filename);
|
||||
continue;
|
||||
|
|
Loading…
Reference in a new issue