Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f10820e4 authored by Wolfram Sang's avatar Wolfram Sang Committed by Ben Dooks
Browse files

i2c-stu300: make sure adapter-name is terminated



Use strlcpy instead of strncpy.

Signed-off-by: default avatarWolfram Sang <w.sang@pengutronix.de>
Cc: Linus Walleij <linus.walleij@stericsson.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: default avatarBen Dooks <ben-linux@fluff.org>
parent d8204a37
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;