diff --git a/drivers/staging/media/imx/imx-media-capture.c b/drivers/staging/media/imx/imx-media-capture.c index 0ccabe04b0e19ad5085173722eb408ff5f2be7ae..4e3fdf8aeef50b5fd02ea8806e42ca4d39bd169e 100644 --- a/drivers/staging/media/imx/imx-media-capture.c +++ b/drivers/staging/media/imx/imx-media-capture.c @@ -73,8 +73,8 @@ static int vidioc_querycap(struct file *file, void *fh, { struct capture_priv *priv = video_drvdata(file); - strncpy(cap->driver, "imx-media-capture", sizeof(cap->driver) - 1); - strncpy(cap->card, "imx-media-capture", sizeof(cap->card) - 1); + strlcpy(cap->driver, "imx-media-capture", sizeof(cap->driver)); + strlcpy(cap->card, "imx-media-capture", sizeof(cap->card)); snprintf(cap->bus_info, sizeof(cap->bus_info), "platform:%s", priv->src_sd->name);