media: replace strcpy() by strscpy()
The strcpy() function is being deprecated upstream. Replace it by the safer strscpy(). Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
このコミットが含まれているのは:
@@ -679,10 +679,10 @@ static int cx231xx_audio_init(struct cx231xx *dev)
|
||||
&snd_cx231xx_pcm_capture);
|
||||
pcm->info_flags = 0;
|
||||
pcm->private_data = dev;
|
||||
strcpy(pcm->name, "Conexant cx231xx Capture");
|
||||
strcpy(card->driver, "Cx231xx-Audio");
|
||||
strcpy(card->shortname, "Cx231xx Audio");
|
||||
strcpy(card->longname, "Conexant cx231xx Audio");
|
||||
strscpy(pcm->name, "Conexant cx231xx Capture", sizeof(pcm->name));
|
||||
strscpy(card->driver, "Cx231xx-Audio", sizeof(card->driver));
|
||||
strscpy(card->shortname, "Cx231xx Audio", sizeof(card->shortname));
|
||||
strscpy(card->longname, "Conexant cx231xx Audio", sizeof(card->longname));
|
||||
|
||||
INIT_WORK(&dev->wq_trigger, audio_trigger);
|
||||
|
||||
|
@@ -1169,7 +1169,7 @@ int cx231xx_enum_input(struct file *file, void *priv,
|
||||
i->index = n;
|
||||
i->type = V4L2_INPUT_TYPE_CAMERA;
|
||||
|
||||
strcpy(i->name, iname[INPUT(n)->type]);
|
||||
strscpy(i->name, iname[INPUT(n)->type], sizeof(i->name));
|
||||
|
||||
if ((CX231XX_VMUX_TELEVISION == INPUT(n)->type) ||
|
||||
(CX231XX_VMUX_CABLE == INPUT(n)->type))
|
||||
@@ -1244,7 +1244,7 @@ int cx231xx_g_tuner(struct file *file, void *priv, struct v4l2_tuner *t)
|
||||
if (0 != t->index)
|
||||
return -EINVAL;
|
||||
|
||||
strcpy(t->name, "Tuner");
|
||||
strscpy(t->name, "Tuner", sizeof(t->name));
|
||||
|
||||
t->type = V4L2_TUNER_ANALOG_TV;
|
||||
t->capability = V4L2_TUNER_CAP_NORM;
|
||||
@@ -1716,7 +1716,7 @@ static int radio_g_tuner(struct file *file, void *priv, struct v4l2_tuner *t)
|
||||
if (t->index)
|
||||
return -EINVAL;
|
||||
|
||||
strcpy(t->name, "Radio");
|
||||
strscpy(t->name, "Radio", sizeof(t->name));
|
||||
|
||||
call_all(dev, tuner, g_tuner, t);
|
||||
|
||||
@@ -2242,7 +2242,8 @@ int cx231xx_register_analog_devices(struct cx231xx *dev)
|
||||
|
||||
/* Initialize VBI template */
|
||||
cx231xx_vbi_template = cx231xx_video_template;
|
||||
strcpy(cx231xx_vbi_template.name, "cx231xx-vbi");
|
||||
strscpy(cx231xx_vbi_template.name, "cx231xx-vbi",
|
||||
sizeof(cx231xx_vbi_template.name));
|
||||
|
||||
/* Allocate and fill vbi video_device struct */
|
||||
cx231xx_vdev_init(dev, &dev->vbi_dev, &cx231xx_vbi_template, "vbi");
|
||||
|
新しいイシューから参照
ユーザーをブロックする