Commit 91079ddc authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

plugins must match "lib*_plugin"LIBEXT, not just "*"LIBEXT

parent 6862cff0
......@@ -898,10 +898,11 @@ static void AllocatePluginDir( vlc_object_t *p_this, module_bank_t *p_bank,
AllocatePluginDir (p_this, p_bank, path, i_maxdepth - 1);
else
if (S_ISREG (st.st_mode)
&& ((size_t)pathlen >= strlen (LIBEXT))
&& !strncasecmp (path + pathlen - strlen (LIBEXT), LIBEXT,
strlen (LIBEXT)))
/* ^^ We only load files ending with LIBEXT */
&& strncmp (path, "lib", 3)
&& ((size_t)pathlen >= sizeof ("_plugin"LIBEXT))
&& !strncasecmp (path + pathlen - strlen ("_plugin"LIBEXT),
"_plugin"LIBEXT, strlen ("_plugni"LIBEXT)))
/* ^^ We only load files matching "lib*_plugin"LIBEXT */
AllocatePluginFile (p_this, p_bank, path, st.st_mtime, st.st_size);
free (path);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment