From bf381907449862230c6ace4f0a2b543641a2af48 Mon Sep 17 00:00:00 2001 From: Chad Versace Date: Wed, 23 May 2012 23:42:15 -0700 Subject: [PATCH] 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 --- src/compositor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compositor.c b/src/compositor.c index c68b5ba..d21459b 100644 --- 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); -- 2.7.4