diff options
author | Wolfram Sang <w.sang@pengutronix.de> | 2011-01-31 15:09:23 +0100 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2011-02-23 00:53:44 +0100 |
commit | f10820e49585f281706ac07570a9e1652bdb5dd9 (patch) | |
tree | e6e70cc53c680a2b92e40ced535fcf450de8d744 /drivers | |
parent | Merge branch 'urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/... (diff) | |
download | linux-f10820e49585f281706ac07570a9e1652bdb5dd9.tar.xz linux-f10820e49585f281706ac07570a9e1652bdb5dd9.zip |
i2c-stu300: make sure adapter-name is terminated
Use strlcpy instead of strncpy.
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: Linus Walleij <linus.walleij@stericsson.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/i2c/busses/i2c-stu300.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-stu300.c b/drivers/i2c/busses/i2c-stu300.c index 495be451d326..266135ddf7fa 100644 --- a/drivers/i2c/busses/i2c-stu300.c +++ b/drivers/i2c/busses/i2c-stu300.c @@ -942,7 +942,7 @@ stu300_probe(struct platform_device *pdev) adap->owner = THIS_MODULE; /* DDC class but actually often used for more generic I2C */ adap->class = I2C_CLASS_DDC; - strncpy(adap->name, "ST Microelectronics DDC I2C adapter", + strlcpy(adap->name, "ST Microelectronics DDC I2C adapter", sizeof(adap->name)); adap->nr = bus_nr; adap->algo = &stu300_algo; |