diff options
author | Jaroslav Kysela <[email protected]> | 2023-01-09 16:12:49 +0100 |
---|---|---|
committer | Takashi Iwai <[email protected]> | 2023-01-09 17:03:24 +0100 |
commit | 70051cffb31b5ee09096351c3b41fcae6f89de31 (patch) | |
tree | c1549eb36aaabf8b820b8097aecee0f3e9d3b82e /tools/testing/selftests/bpf/prog_tests | |
parent | 291e9da91403e0e628d7692b5ed505100e7b7706 (diff) |
ALSA: control-led: use strscpy in set_led_id()
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.
Fixes: a135dfb5de15 ("ALSA: led control - add sysfs kcontrol LED marking layer")
Reported-by: [email protected]
Link: https://lore.kernel.org/alsa-devel/[email protected]/
Cc: <[email protected]>
Signed-off-by: Jaroslav Kysela <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests')
0 files changed, 0 insertions, 0 deletions