diff options
author | Kees Cook <keescook@chromium.org> | 2014-10-20 17:47:34 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2014-10-21 06:48:51 -0400 |
commit | a1ecf3c4560ef8260f73ffb85b425f3a046cd419 (patch) | |
tree | 0e29785e45651beab186dd01284838f9fab35c93 | |
parent | b832e749f0c750b06deece320489e8a9e6ae9e80 (diff) |
[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>
-rw-r--r-- | drivers/media/usb/dvb-usb-v2/af9035.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/usb/dvb-usb-v2/af9035.c b/drivers/media/usb/dvb-usb-v2/af9035.c index 00758c83eec7..1896ab218b11 100644 --- a/drivers/media/usb/dvb-usb-v2/af9035.c +++ b/drivers/media/usb/dvb-usb-v2/af9035.c | |||
@@ -193,8 +193,8 @@ static int af9035_wr_reg_mask(struct dvb_usb_device *d, u32 reg, u8 val, | |||
193 | return af9035_wr_regs(d, reg, &val, 1); | 193 | return af9035_wr_regs(d, reg, &val, 1); |
194 | } | 194 | } |
195 | 195 | ||
196 | static int af9035_add_i2c_dev(struct dvb_usb_device *d, char *type, u8 addr, | 196 | static int af9035_add_i2c_dev(struct dvb_usb_device *d, const char *type, |
197 | void *platform_data, struct i2c_adapter *adapter) | 197 | u8 addr, void *platform_data, struct i2c_adapter *adapter) |
198 | { | 198 | { |
199 | int ret, num; | 199 | int ret, num; |
200 | struct state *state = d_to_priv(d); | 200 | 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, | |||
221 | goto err; | 221 | goto err; |
222 | } | 222 | } |
223 | 223 | ||
224 | request_module(board_info.type); | 224 | request_module("%s", board_info.type); |
225 | 225 | ||
226 | /* register I2C device */ | 226 | /* register I2C device */ |
227 | client = i2c_new_device(adapter, &board_info); | 227 | client = i2c_new_device(adapter, &board_info); |