Skip to content

Commit

Permalink
ALSA: core: control_led: use strscpy instead of strlcpy
Browse files Browse the repository at this point in the history
strlcpy is deprecated, use its safe replacement

Signed-off-by: Pierre-Louis Bossart <[email protected]>
Reviewed-by: Ranjani Sridharan <[email protected]>
Reviewed-by: Bard Liao <[email protected]>
Reviewed-by: Paul Olaru <[email protected]>
Reviewed-by: Kai Vehmanen <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
plbossart authored and tiwai committed Aug 13, 2021
1 parent 7482ec7 commit 360a581
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/core/control_led.c
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ static ssize_t set_led_id(struct snd_ctl_led_card *led_card, const char *buf, si
else {
for (; *s >= ' '; s++);
*s = '\0';
strlcpy(id.name, buf2, sizeof(id.name));
strscpy(id.name, buf2, sizeof(id.name));
}
break;
}
Expand Down

0 comments on commit 360a581

Please sign in to comment.