Skip to content

Commit

Permalink
i2c-stu300: make sure adapter-name is terminated
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wolfram Sang authored and Ben Dooks committed Feb 22, 2011
1 parent d8204a3 commit f10820e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/i2c/busses/i2c-stu300.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f10820e

Please sign in to comment.