Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7383159f authored by Kees Cook's avatar Kees Cook Committed by Mauro Carvalho Chehab
Browse files

[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: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent a1ecf3c4
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -630,8 +630,8 @@ error:
	return ret;
	return ret;
}
}


static int anysee_add_i2c_dev(struct dvb_usb_device *d, char *type, u8 addr,
static int anysee_add_i2c_dev(struct dvb_usb_device *d, const char *type,
		void *platform_data)
		u8 addr, void *platform_data)
{
{
	int ret, num;
	int ret, num;
	struct anysee_state *state = d_to_priv(d);
	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;
		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);