Re: [PATCH v2] ALSA: control-led: use strscpy in set_led_id()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09. 01. 23 16:04, Takashi Iwai wrote:
On Mon, 09 Jan 2023 16:01:18 +0100,
Jaroslav Kysela wrote:

The use of strncpy() in the set_led_id() was incorrect.
The len variable should use 'min(sizeof(buf2) - 1, count)'
expression.

Use strscpy() function to simplify things and handle the error gracefully.

Reported-by: yang.yang29@xxxxxxxxxx
BugLink: https://lore.kernel.org/alsa-devel/202301091945513559977@xxxxxxxxxx/

Let's use the normal Link tag instead of BugLink.  The former is
preferred.

Also, it'd be great if you can put the Fixes tag, too.

Done. Sent v3.

			Thanks,
				Jaroslav

--
Jaroslav Kysela <perex@xxxxxxxx>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux