Skip to content

Commit

Permalink
media: tm6000: Avoid card name truncation
Browse files Browse the repository at this point in the history
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: Hans Verkuil <[email protected]>
Fixes: e28f49b ("V4L/DVB: tm6000: fix some info messages")
Signed-off-by: Kees Cook <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
kees authored and mchehab committed Sep 30, 2021
1 parent 2908249 commit 42bb98e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/media/usb/tm6000/tm6000-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -852,8 +852,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;
Expand Down

0 comments on commit 42bb98e

Please sign in to comment.