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

Commit 4e65b9ec authored by Kees Cook's avatar Kees Cook Committed by Greg Kroah-Hartman
Browse files

media: radio-wl1273: Avoid card name truncation



[ Upstream commit dfadec236aa99f6086141949c9dc3ec50f3ff20d ]

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, "Texas Instruments Wl1273 FM Rad".

Suggested-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Fixes: 87d1a50c ("[media] V4L2: WL1273 FM Radio: TI WL1273 FM radio driver")
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 8eeec127
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1279,7 +1279,7 @@ static int wl1273_fm_vidioc_querycap(struct file *file, void *priv,

	strscpy(capability->driver, WL1273_FM_DRIVER_NAME,
		sizeof(capability->driver));
	strscpy(capability->card, "Texas Instruments Wl1273 FM Radio",
	strscpy(capability->card, "TI Wl1273 FM Radio",
		sizeof(capability->card));
	strscpy(capability->bus_info, radio->bus_type,
		sizeof(capability->bus_info));