From: Wolfram Sang Date: Thu, 19 Apr 2012 15:31:01 +0000 (+0200) Subject: i2c: imx: don't use strcpy but strlcpy X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=973c5ed45dbdf8fd90e300826507b5e6814916af;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git i2c: imx: don't use strcpy but strlcpy Signed-off-by: Wolfram Sang --- diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index dfb84b7ee550..cdcf313098be 100644 --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c-imx.c @@ -510,7 +510,7 @@ static int __init i2c_imx_probe(struct platform_device *pdev) } /* Setup i2c_imx driver structure */ - strcpy(i2c_imx->adapter.name, pdev->name); + strlcpy(i2c_imx->adapter.name, pdev->name, sizeof(i2c_imx->adapter.name)); i2c_imx->adapter.owner = THIS_MODULE; i2c_imx->adapter.algo = &i2c_imx_algo; i2c_imx->adapter.dev.parent = &pdev->dev;