From: Andy Walls Date: Sat, 17 Jan 2009 16:37:36 +0000 (-0300) Subject: V4L/DVB (10283): cx18: Call request_module() with proper argument types. X-Git-Tag: firefly_0821_release~15196^2~675 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=be411df610a970a0ab90e3b02d025ab2a3554b61;p=firefly-linux-kernel-4.4.55.git V4L/DVB (10283): cx18: Call request_module() with proper argument types. request_module() needs to be called with a string literal for a format string or with 1 or more variable arguments to avoid compiler warnings and possible exploits, if someone could cause us to get a format string with a '%' code in the format string when we make the call. Reported-by: Brandon Jenkins Signed-off-by: Andy Walls Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/cx18/cx18-driver.c b/drivers/media/video/cx18/cx18-driver.c index 450c48dd995a..1d3a865b9c6d 100644 --- a/drivers/media/video/cx18/cx18-driver.c +++ b/drivers/media/video/cx18/cx18-driver.c @@ -728,7 +728,7 @@ static u32 cx18_request_module(struct cx18 *cx, u32 hw, { if ((hw & id) == 0) return hw; - if (request_module(name) != 0) { + if (request_module("%s", name) != 0) { CX18_ERR("Failed to load module %s\n", name); return hw & ~id; }