i2c: imx: don't use strcpy but strlcpy
authorWolfram Sang <wolfram@the-dreams.de>
Thu, 19 Apr 2012 15:31:01 +0000 (17:31 +0200)
committerWolfram Sang <w.sang@pengutronix.de>
Sat, 12 May 2012 12:28:14 +0000 (14:28 +0200)
Signed-off-by: Wolfram Sang <wolfram@the-dreams.de>
drivers/i2c/busses/i2c-imx.c

index dfb84b7..cdcf313 100644 (file)
@@ -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;