Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1c2c8030 authored by Kees Cook's avatar Kees Cook Committed by Greg Kroah-Hartman
Browse files

media: tm6000: Avoid card name truncation



[ Upstream commit 42bb98e420d454fef3614b70ea11cc59068395f6 ]

The "card" string only holds 31 characters (and the terminating NUL).
In order to avoid truncation, use a shorter card description instead of
the current result, "Trident TVMaster TM5600/6000/60".

Suggested-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Fixes: e28f49b0 ("V4L/DVB: tm6000: fix some info messages")
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 61266f85
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -854,8 +854,7 @@ static int vidioc_querycap(struct file *file, void *priv,
	struct tm6000_core *dev = ((struct tm6000_fh *)priv)->dev;

	strscpy(cap->driver, "tm6000", sizeof(cap->driver));
	strscpy(cap->card, "Trident TVMaster TM5600/6000/6010",
		sizeof(cap->card));
	strscpy(cap->card, "Trident TM5600/6000/6010", sizeof(cap->card));
	usb_make_path(dev->udev, cap->bus_info, sizeof(cap->bus_info));
	cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_READWRITE |
			    V4L2_CAP_DEVICE_CAPS;