diff options
Diffstat (limited to 'drivers/media/usb/hdpvr/hdpvr-video.c')
-rw-r--r-- | drivers/media/usb/hdpvr/hdpvr-video.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/media/usb/hdpvr/hdpvr-video.c b/drivers/media/usb/hdpvr/hdpvr-video.c index 1b89c77bad66..e082086428a4 100644 --- a/drivers/media/usb/hdpvr/hdpvr-video.c +++ b/drivers/media/usb/hdpvr/hdpvr-video.c @@ -578,8 +578,8 @@ static int vidioc_querycap(struct file *file, void *priv, { struct hdpvr_device *dev = video_drvdata(file); - strcpy(cap->driver, "hdpvr"); - strcpy(cap->card, "Hauppauge HD PVR"); + strscpy(cap->driver, "hdpvr", sizeof(cap->driver)); + strscpy(cap->card, "Hauppauge HD PVR", sizeof(cap->card)); usb_make_path(dev->udev, cap->bus_info, sizeof(cap->bus_info)); cap->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_AUDIO | V4L2_CAP_READWRITE; @@ -873,7 +873,7 @@ static int vidioc_g_audio(struct file *file, void *private_data, audio->index = dev->options.audio_input; audio->capability = V4L2_AUDCAP_STEREO; - strlcpy(audio->name, audio_iname[audio->index], sizeof(audio->name)); + strscpy(audio->name, audio_iname[audio->index], sizeof(audio->name)); audio->name[sizeof(audio->name) - 1] = '\0'; return 0; } @@ -1238,7 +1238,8 @@ int hdpvr_register_videodev(struct hdpvr_device *dev, struct device *parent, /* setup and register video device */ dev->video_dev = hdpvr_video_template; - strcpy(dev->video_dev.name, "Hauppauge HD PVR"); + strscpy(dev->video_dev.name, "Hauppauge HD PVR", + sizeof(dev->video_dev.name)); dev->video_dev.v4l2_dev = &dev->v4l2_dev; video_set_drvdata(&dev->video_dev, dev); |