projects
/
profile
/
ivi
/
weston-ivi-shell.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
629ce23
)
compositor: Fix buggy snprintf that sets module path
author
Chad Versace
<chad.versace@linux.intel.com>
Thu, 24 May 2012 06:42:15 +0000
(23:42 -0700)
committer
Kristian Høgsberg
<krh@bitplanet.net>
Sat, 26 May 2012 03:05:44 +0000
(23:05 -0400)
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>
src/compositor.c
patch
|
blob
|
history
diff --git
a/src/compositor.c
b/src/compositor.c
index
c68b5ba
..
d21459b
100644
(file)
--- a/
src/compositor.c
+++ b/
src/compositor.c
@@
-2777,7
+2777,7
@@
load_module(const char *name, const char *entrypoint, void **handle)
void *module, *init;
if (name[0] != '/')
- snprintf(path, sizeof path,
MODULEDIR "/%s"
, name);
+ snprintf(path, sizeof path,
"%s/%s", MODULEDIR
, name);
else
snprintf(path, sizeof path, "%s", name);