From: Andy Walls Date: Sat, 28 Feb 2009 16:19:45 +0000 (-0300) Subject: V4L/DVB (10850): cx18: Use strlcpy() instead of strncpy() for temp eeprom i2c_client... X-Git-Tag: firefly_0821_release~15196^2~330 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=098003d8e21c490c104b543918dea12b7608a173;p=firefly-linux-kernel-4.4.55.git V4L/DVB (10850): cx18: Use strlcpy() instead of strncpy() for temp eeprom i2c_client setup Signed-off-by: Andy Walls Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/cx18/cx18-driver.c b/drivers/media/video/cx18/cx18-driver.c index 0d24e2297457..210c68aaae00 100644 --- a/drivers/media/video/cx18/cx18-driver.c +++ b/drivers/media/video/cx18/cx18-driver.c @@ -273,8 +273,7 @@ void cx18_read_eeprom(struct cx18 *cx, struct tveeprom *tv) u8 eedata[256]; memset(&c, 0, sizeof(c)); - strncpy(c.name, "cx18 tveeprom tmp", sizeof(c.name)); - c.name[sizeof(c.name)-1] = '\0'; + strlcpy(c.name, "cx18 tveeprom tmp", sizeof(c.name)); c.adapter = &cx->i2c_adap[0]; c.addr = 0xA0 >> 1;