upstream: [media] media: rc-core: use %s in rc_map_get() module load
authorKees Cook <keescook@chromium.org>
Tue, 11 Mar 2014 20:25:53 +0000 (17:25 -0300)
committerChanho Park <chanho61.park@samsung.com>
Tue, 18 Nov 2014 02:55:03 +0000 (11:55 +0900)
rc_map_get() takes a single string literal for the module to load,
so make sure it cannot be used as a format string in the call to
request_module().

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/rc/rc-main.c

index 8605a24..2dbf375 100644 (file)
@@ -58,7 +58,7 @@ struct rc_map *rc_map_get(const char *name)
        map = seek_rc_map(name);
 #ifdef MODULE
        if (!map) {
-               int rc = request_module(name);
+               int rc = request_module("%s", name);
                if (rc < 0) {
                        printk(KERN_ERR "Couldn't load IR keymap %s\n", name);
                        return NULL;