[media] af9035: 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: Kees Cook <keescook@chromium.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This commit is contained in:
parent
b832e749f0
commit
a1ecf3c456
|
@ -193,8 +193,8 @@ static int af9035_wr_reg_mask(struct dvb_usb_device *d, u32 reg, u8 val,
|
||||||
return af9035_wr_regs(d, reg, &val, 1);
|
return af9035_wr_regs(d, reg, &val, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int af9035_add_i2c_dev(struct dvb_usb_device *d, char *type, u8 addr,
|
static int af9035_add_i2c_dev(struct dvb_usb_device *d, const char *type,
|
||||||
void *platform_data, struct i2c_adapter *adapter)
|
u8 addr, void *platform_data, struct i2c_adapter *adapter)
|
||||||
{
|
{
|
||||||
int ret, num;
|
int ret, num;
|
||||||
struct state *state = d_to_priv(d);
|
struct state *state = d_to_priv(d);
|
||||||
|
@ -221,7 +221,7 @@ static int af9035_add_i2c_dev(struct dvb_usb_device *d, char *type, u8 addr,
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
request_module(board_info.type);
|
request_module("%s", board_info.type);
|
||||||
|
|
||||||
/* register I2C device */
|
/* register I2C device */
|
||||||
client = i2c_new_device(adapter, &board_info);
|
client = i2c_new_device(adapter, &board_info);
|
||||||
|
|
Loading…
Reference in New Issue