compositor: Fix buggy snprintf that sets module path
If the MODULEDIR string contains '%', then
snprintf(path, sizeof(path), MODULEDIR "/%s", name);
does not do what you want.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
This commit is contained in:
committed by
Kristian Høgsberg
parent
629ce23bd0
commit
bf38190744
+1
-1
@@ -2777,7 +2777,7 @@ load_module(const char *name, const char *entrypoint, void **handle)
|
|||||||
void *module, *init;
|
void *module, *init;
|
||||||
|
|
||||||
if (name[0] != '/')
|
if (name[0] != '/')
|
||||||
snprintf(path, sizeof path, MODULEDIR "/%s", name);
|
snprintf(path, sizeof path, "%s/%s", MODULEDIR, name);
|
||||||
else
|
else
|
||||||
snprintf(path, sizeof path, "%s", name);
|
snprintf(path, sizeof path, "%s", name);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user