Merge tag 'media/v4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
[muen/linux.git] / drivers / media / v4l2-core / v4l2-ioctl.c
index c148c44..c637469 100644 (file)
@@ -121,7 +121,7 @@ int v4l2_video_std_construct(struct v4l2_standard *vs,
        vs->id = id;
        v4l2_video_std_frame_period(id, &vs->frameperiod);
        vs->framelines = (id & V4L2_STD_525_60) ? 525 : 625;
-       strlcpy(vs->name, name, sizeof(vs->name));
+       strscpy(vs->name, name, sizeof(vs->name));
        return 0;
 }
 EXPORT_SYMBOL(v4l2_video_std_construct);
@@ -1354,7 +1354,7 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)
        }
 
        if (descr)
-               WARN_ON(strlcpy(fmt->description, descr, sz) >= sz);
+               WARN_ON(strscpy(fmt->description, descr, sz) >= sz);
        fmt->flags = flags;
 }
 
@@ -2393,7 +2393,7 @@ static int v4l_dbg_g_chip_info(const struct v4l2_ioctl_ops *ops,
                        p->flags |= V4L2_CHIP_FL_WRITABLE;
                if (ops->vidioc_g_register)
                        p->flags |= V4L2_CHIP_FL_READABLE;
-               strlcpy(p->name, vfd->v4l2_dev->name, sizeof(p->name));
+               strscpy(p->name, vfd->v4l2_dev->name, sizeof(p->name));
                if (ops->vidioc_g_chip_info)
                        return ops->vidioc_g_chip_info(file, fh, arg);
                if (p->match.addr)
@@ -2410,7 +2410,7 @@ static int v4l_dbg_g_chip_info(const struct v4l2_ioctl_ops *ops,
                                p->flags |= V4L2_CHIP_FL_WRITABLE;
                        if (sd->ops->core && sd->ops->core->g_register)
                                p->flags |= V4L2_CHIP_FL_READABLE;
-                       strlcpy(p->name, sd->name, sizeof(p->name));
+                       strscpy(p->name, sd->name, sizeof(p->name));
                        return 0;
                }
                break;