diff options
Diffstat (limited to 'drivers/media/pci/saa7164')
-rw-r--r-- | drivers/media/pci/saa7164/saa7164-core.c | 2 | ||||
-rw-r--r-- | drivers/media/pci/saa7164/saa7164-dvb.c | 10 | ||||
-rw-r--r-- | drivers/media/pci/saa7164/saa7164-encoder.c | 10 | ||||
-rw-r--r-- | drivers/media/pci/saa7164/saa7164-i2c.c | 2 | ||||
-rw-r--r-- | drivers/media/pci/saa7164/saa7164-vbi.c | 4 |
5 files changed, 14 insertions, 14 deletions
diff --git a/drivers/media/pci/saa7164/saa7164-core.c b/drivers/media/pci/saa7164/saa7164-core.c index d697e1ad929c..f33349e16359 100644 --- a/drivers/media/pci/saa7164/saa7164-core.c +++ b/drivers/media/pci/saa7164/saa7164-core.c @@ -179,7 +179,7 @@ static void saa7164_histogram_reset(struct saa7164_histogram *hg, char *name) int i; memset(hg, 0, sizeof(struct saa7164_histogram)); - strcpy(hg->name, name); + strscpy(hg->name, name, sizeof(hg->name)); /* First 30ms x 1ms */ for (i = 0; i < 30; i++) diff --git a/drivers/media/pci/saa7164/saa7164-dvb.c b/drivers/media/pci/saa7164/saa7164-dvb.c index 4f9f03c3b252..dfb118d7d1ec 100644 --- a/drivers/media/pci/saa7164/saa7164-dvb.c +++ b/drivers/media/pci/saa7164/saa7164-dvb.c @@ -120,7 +120,7 @@ static int si2157_attach(struct saa7164_port *port, struct i2c_adapter *adapter, memset(&bi, 0, sizeof(bi)); - strlcpy(bi.type, "si2157", I2C_NAME_SIZE); + strscpy(bi.type, "si2157", I2C_NAME_SIZE); bi.platform_data = cfg; bi.addr = addr8bit >> 1; @@ -643,7 +643,7 @@ int saa7164_dvb_register(struct saa7164_port *port) si2168_config.fe = &port->dvb.frontend; si2168_config.ts_mode = SI2168_TS_SERIAL; memset(&info, 0, sizeof(struct i2c_board_info)); - strlcpy(info.type, "si2168", I2C_NAME_SIZE); + strscpy(info.type, "si2168", I2C_NAME_SIZE); info.addr = 0xc8 >> 1; info.platform_data = &si2168_config; request_module(info.type); @@ -663,7 +663,7 @@ int saa7164_dvb_register(struct saa7164_port *port) si2157_config.if_port = 1; si2157_config.fe = port->dvb.frontend; memset(&info, 0, sizeof(struct i2c_board_info)); - strlcpy(info.type, "si2157", I2C_NAME_SIZE); + strscpy(info.type, "si2157", I2C_NAME_SIZE); info.addr = 0xc0 >> 1; info.platform_data = &si2157_config; request_module(info.type); @@ -688,7 +688,7 @@ int saa7164_dvb_register(struct saa7164_port *port) si2168_config.fe = &port->dvb.frontend; si2168_config.ts_mode = SI2168_TS_SERIAL; memset(&info, 0, sizeof(struct i2c_board_info)); - strlcpy(info.type, "si2168", I2C_NAME_SIZE); + strscpy(info.type, "si2168", I2C_NAME_SIZE); info.addr = 0xcc >> 1; info.platform_data = &si2168_config; request_module(info.type); @@ -708,7 +708,7 @@ int saa7164_dvb_register(struct saa7164_port *port) si2157_config.fe = port->dvb.frontend; si2157_config.if_port = 1; memset(&info, 0, sizeof(struct i2c_board_info)); - strlcpy(info.type, "si2157", I2C_NAME_SIZE); + strscpy(info.type, "si2157", I2C_NAME_SIZE); info.addr = 0xc0 >> 1; info.platform_data = &si2157_config; request_module(info.type); diff --git a/drivers/media/pci/saa7164/saa7164-encoder.c b/drivers/media/pci/saa7164/saa7164-encoder.c index 32136ebe4f61..adec2bab8352 100644 --- a/drivers/media/pci/saa7164/saa7164-encoder.c +++ b/drivers/media/pci/saa7164/saa7164-encoder.c @@ -258,7 +258,7 @@ int saa7164_enum_input(struct file *file, void *priv, struct v4l2_input *i) if (i->index >= 7) return -EINVAL; - strcpy(i->name, inputs[i->index]); + strscpy(i->name, inputs[i->index], sizeof(i->name)); if (i->index == 0) i->type = V4L2_INPUT_TYPE_TUNER; @@ -325,7 +325,7 @@ int saa7164_g_tuner(struct file *file, void *priv, struct v4l2_tuner *t) if (0 != t->index) return -EINVAL; - strcpy(t->name, "tuner"); + strscpy(t->name, "tuner", sizeof(t->name)); t->capability = V4L2_TUNER_CAP_NORM | V4L2_TUNER_CAP_STEREO; t->rangelow = SAA7164_TV_MIN_FREQ; t->rangehigh = SAA7164_TV_MAX_FREQ; @@ -497,8 +497,8 @@ static int vidioc_querycap(struct file *file, void *priv, struct saa7164_port *port = fh->port; struct saa7164_dev *dev = port->dev; - strcpy(cap->driver, dev->name); - strlcpy(cap->card, saa7164_boards[dev->board].name, + strscpy(cap->driver, dev->name, sizeof(cap->driver)); + strscpy(cap->card, saa7164_boards[dev->board].name, sizeof(cap->card)); sprintf(cap->bus_info, "PCI:%s", pci_name(dev->pci)); @@ -520,7 +520,7 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv, if (f->index != 0) return -EINVAL; - strlcpy(f->description, "MPEG", sizeof(f->description)); + strscpy(f->description, "MPEG", sizeof(f->description)); f->pixelformat = V4L2_PIX_FMT_MPEG; return 0; diff --git a/drivers/media/pci/saa7164/saa7164-i2c.c b/drivers/media/pci/saa7164/saa7164-i2c.c index 6d13cbb9d010..317f48bc6506 100644 --- a/drivers/media/pci/saa7164/saa7164-i2c.c +++ b/drivers/media/pci/saa7164/saa7164-i2c.c @@ -99,7 +99,7 @@ int saa7164_i2c_register(struct saa7164_i2c *bus) bus->i2c_adap.dev.parent = &dev->pci->dev; - strlcpy(bus->i2c_adap.name, bus->dev->name, + strscpy(bus->i2c_adap.name, bus->dev->name, sizeof(bus->i2c_adap.name)); bus->i2c_adap.algo_data = bus; diff --git a/drivers/media/pci/saa7164/saa7164-vbi.c b/drivers/media/pci/saa7164/saa7164-vbi.c index 221de91a8bae..841c7e94405d 100644 --- a/drivers/media/pci/saa7164/saa7164-vbi.c +++ b/drivers/media/pci/saa7164/saa7164-vbi.c @@ -208,8 +208,8 @@ static int vidioc_querycap(struct file *file, void *priv, struct saa7164_port *port = fh->port; struct saa7164_dev *dev = port->dev; - strcpy(cap->driver, dev->name); - strlcpy(cap->card, saa7164_boards[dev->board].name, + strscpy(cap->driver, dev->name, sizeof(cap->driver)); + strscpy(cap->card, saa7164_boards[dev->board].name, sizeof(cap->card)); sprintf(cap->bus_info, "PCI:%s", pci_name(dev->pci)); |