]> Git Repo - J-linux.git/commitdiff
media: tm6000: Avoid card name truncation
authorKees Cook <[email protected]>
Tue, 3 Aug 2021 19:46:10 +0000 (21:46 +0200)
committerMauro Carvalho Chehab <[email protected]>
Thu, 30 Sep 2021 08:08:00 +0000 (10:08 +0200)
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: e28f49b0b2a8 ("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]>
drivers/media/usb/tm6000/tm6000-video.c

index 3f650ede0c3dc50a3bd2970998759a677cbe6ea3..e293f6f3d1bc9ea7e6db12829d0d4d041eb1e47f 100644 (file)
@@ -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;
This page took 0.058471 seconds and 4 git commands to generate.