提交 7383159f 编写于 作者: K Kees Cook 提交者: Mauro Carvalho Chehab

[media] anysee: make sure loading modules is const

Make sure that loaded modules are const char strings so we don't
load arbitrary modules in the future, nor allow for format string
leaks in the module request call.
Signed-off-by: NKees Cook <keescook@chromium.org>
Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
上级 a1ecf3c4
......@@ -630,8 +630,8 @@ static int anysee_frontend_ctrl(struct dvb_frontend *fe, int onoff)
return ret;
}
static int anysee_add_i2c_dev(struct dvb_usb_device *d, char *type, u8 addr,
void *platform_data)
static int anysee_add_i2c_dev(struct dvb_usb_device *d, const char *type,
u8 addr, void *platform_data)
{
int ret, num;
struct anysee_state *state = d_to_priv(d);
......@@ -659,7 +659,7 @@ static int anysee_add_i2c_dev(struct dvb_usb_device *d, char *type, u8 addr,
goto err;
}
request_module(board_info.type);
request_module("%s", board_info.type);
/* register I2C device */
client = i2c_new_device(adapter, &board_info);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册