From cc1e6315e83db0e517dd9279050b88adc83a7eba Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 10 Sep 2018 16:20:42 -0400 Subject: media: replace strcpy() by strscpy() The strcpy() function is being deprecated upstream. Replace it by the safer strscpy(). Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/pci/smipcie/smipcie-main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/media/pci/smipcie/smipcie-main.c') diff --git a/drivers/media/pci/smipcie/smipcie-main.c b/drivers/media/pci/smipcie/smipcie-main.c index 4c2da27fee4b..4d5ddbcb3514 100644 --- a/drivers/media/pci/smipcie/smipcie-main.c +++ b/drivers/media/pci/smipcie/smipcie-main.c @@ -191,7 +191,7 @@ static int smi_i2c_init(struct smi_dev *dev) /* i2c bus 0 */ smi_i2c_cfg(dev, I2C_A_SW_CTL); i2c_set_adapdata(&dev->i2c_bus[0], dev); - strcpy(dev->i2c_bus[0].name, "SMI-I2C0"); + strscpy(dev->i2c_bus[0].name, "SMI-I2C0", sizeof(dev->i2c_bus[0].name)); dev->i2c_bus[0].owner = THIS_MODULE; dev->i2c_bus[0].dev.parent = &dev->pci_dev->dev; dev->i2c_bus[0].algo_data = &dev->i2c_bit[0]; @@ -213,7 +213,7 @@ static int smi_i2c_init(struct smi_dev *dev) /* i2c bus 1 */ smi_i2c_cfg(dev, I2C_B_SW_CTL); i2c_set_adapdata(&dev->i2c_bus[1], dev); - strcpy(dev->i2c_bus[1].name, "SMI-I2C1"); + strscpy(dev->i2c_bus[1].name, "SMI-I2C1", sizeof(dev->i2c_bus[1].name)); dev->i2c_bus[1].owner = THIS_MODULE; dev->i2c_bus[1].dev.parent = &dev->pci_dev->dev; dev->i2c_bus[1].algo_data = &dev->i2c_bit[1]; -- cgit v1.2.1