summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/frontends/s5h1420.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-08-29 19:25:01 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-08-29 19:25:01 -0300
commite42386aedc2aa6ffac0885f4bbac318bb5819ea6 (patch)
tree5458677fbd99df720d408a70c5fb74df067fad64 /linux/drivers/media/dvb/frontends/s5h1420.c
parentdee4b1d79231d5ddf2f0e3b033be9f7264301a7f (diff)
downloadmediapointer-dvb-s2-e42386aedc2aa6ffac0885f4bbac318bb5819ea6.tar.gz
mediapointer-dvb-s2-e42386aedc2aa6ffac0885f4bbac318bb5819ea6.tar.bz2
dvb: fix I2C adapters name size
From: Jean Delvare <khali@linux-fr.org> Some DVB drivers are incorrectly assuming that the size of i2c_adapter.name is I2C_NAME_SIZE. Here's a fix. Also change strncpy to strlcpy, as the former is error-prone (and was indeed incorrectly used.) Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Uwe Bugla <uwe.bugla@gmx.de> Reviewed-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Steven Toth <stoth@hauppauge.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/dvb/frontends/s5h1420.c')
-rw-r--r--linux/drivers/media/dvb/frontends/s5h1420.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/linux/drivers/media/dvb/frontends/s5h1420.c b/linux/drivers/media/dvb/frontends/s5h1420.c
index 996f37704..b768da972 100644
--- a/linux/drivers/media/dvb/frontends/s5h1420.c
+++ b/linux/drivers/media/dvb/frontends/s5h1420.c
@@ -946,7 +946,8 @@ struct dvb_frontend *s5h1420_attach(const struct s5h1420_config *config,
state->frontend.demodulator_priv = state;
/* create tuner i2c adapter */
- strncpy(state->tuner_i2c_adapter.name, "S5H1420-PN1010 tuner I2C bus", I2C_NAME_SIZE);
+ strlcpy(state->tuner_i2c_adapter.name, "S5H1420-PN1010 tuner I2C bus",
+ sizeof(state->tuner_i2c_adapter.name));
state->tuner_i2c_adapter.class = I2C_CLASS_TV_DIGITAL,
state->tuner_i2c_adapter.algo = &s5h1420_tuner_i2c_algo;
state->tuner_i2c_adapter.algo_data = NULL;