V4L/DVB (10850): cx18: Use strlcpy() instead of strncpy() for temp eeprom i2c_client...
authorAndy Walls <awalls@radix.net>
Sat, 28 Feb 2009 16:19:45 +0000 (13:19 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 30 Mar 2009 15:43:09 +0000 (12:43 -0300)
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/cx18/cx18-driver.c

index 0d24e229745781ee0c74d70b98a02e863a44d4d4..210c68aaae00ede73af85a4804b156e246a8fe6c 100644 (file)
@@ -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;