Skip to content

Commit

Permalink
V4L/DVB (10283): cx18: Call request_module() with proper argument types.
Browse files Browse the repository at this point in the history
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 <bcjenkins@tvwhere.com>
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Andy Walls authored and Mauro Carvalho Chehab committed Mar 30, 2009
1 parent 888cdb0 commit be411df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/video/cx18/cx18-driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit be411df

Please sign in to comment.