diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2009-08-08 11:58:52 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-09-12 11:18:50 -0400 |
commit | bd0eb12f61fef7f500e374b8d5068e7556f61901 (patch) | |
tree | ecc19872949f6db55c3d8f9e2fd845fdd66a349d /drivers/media | |
parent | a35c87c7084f3f4972f3ce5f23cfcb34f95341b1 (diff) |
V4L/DVB (12435): strlcpy() will always null terminate the string.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/dvb/dvb-usb/dvb-usb-i2c.c | 2 | ||||
-rw-r--r-- | drivers/media/video/pwc/pwc-v4l.c | 2 | ||||
-rw-r--r-- | drivers/media/video/zoran/zoran_card.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c b/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c index 326f7608954b..cead089bbb4f 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c +++ b/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c | |||
@@ -19,7 +19,7 @@ int dvb_usb_i2c_init(struct dvb_usb_device *d) | |||
19 | return -EINVAL; | 19 | return -EINVAL; |
20 | } | 20 | } |
21 | 21 | ||
22 | strncpy(d->i2c_adap.name, d->desc->name, sizeof(d->i2c_adap.name)); | 22 | strlcpy(d->i2c_adap.name, d->desc->name, sizeof(d->i2c_adap.name)); |
23 | d->i2c_adap.class = I2C_CLASS_TV_DIGITAL, | 23 | d->i2c_adap.class = I2C_CLASS_TV_DIGITAL, |
24 | d->i2c_adap.algo = d->props.i2c_algo; | 24 | d->i2c_adap.algo = d->props.i2c_algo; |
25 | d->i2c_adap.algo_data = NULL; | 25 | d->i2c_adap.algo_data = NULL; |
diff --git a/drivers/media/video/pwc/pwc-v4l.c b/drivers/media/video/pwc/pwc-v4l.c index 2876ce084510..bdb4ced57496 100644 --- a/drivers/media/video/pwc/pwc-v4l.c +++ b/drivers/media/video/pwc/pwc-v4l.c | |||
@@ -1033,7 +1033,7 @@ long pwc_video_do_ioctl(struct file *file, unsigned int cmd, void *arg) | |||
1033 | if (std->index != 0) | 1033 | if (std->index != 0) |
1034 | return -EINVAL; | 1034 | return -EINVAL; |
1035 | std->id = V4L2_STD_UNKNOWN; | 1035 | std->id = V4L2_STD_UNKNOWN; |
1036 | strncpy(std->name, "webcam", sizeof(std->name)); | 1036 | strlcpy(std->name, "webcam", sizeof(std->name)); |
1037 | return 0; | 1037 | return 0; |
1038 | } | 1038 | } |
1039 | 1039 | ||
diff --git a/drivers/media/video/zoran/zoran_card.c b/drivers/media/video/zoran/zoran_card.c index 40d07faa4a24..0c4d9b1f8e6f 100644 --- a/drivers/media/video/zoran/zoran_card.c +++ b/drivers/media/video/zoran/zoran_card.c | |||
@@ -1168,7 +1168,7 @@ zoran_setup_videocodec (struct zoran *zr, | |||
1168 | m->type = 0; | 1168 | m->type = 0; |
1169 | 1169 | ||
1170 | m->flags = CODEC_FLAG_ENCODER | CODEC_FLAG_DECODER; | 1170 | m->flags = CODEC_FLAG_ENCODER | CODEC_FLAG_DECODER; |
1171 | strncpy(m->name, ZR_DEVNAME(zr), sizeof(m->name)); | 1171 | strlcpy(m->name, ZR_DEVNAME(zr), sizeof(m->name)); |
1172 | m->data = zr; | 1172 | m->data = zr; |
1173 | 1173 | ||
1174 | switch (type) | 1174 | switch (type) |