ALSA: intel_hdmi: Use strlcpy() instead of strncpy()
authorTakashi Iwai <tiwai@suse.de>
Wed, 27 Jun 2018 12:59:00 +0000 (14:59 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 8 Dec 2018 12:03:35 +0000 (13:03 +0100)
commit23df63002205f17d307af118fe0025f6e49d389a
tree068beceed7e2d91f85b5760c1c9c5e52ebc77df1
parentaf882cb0bcb5573014e2203dbfd67e2737bb10d3
ALSA: intel_hdmi: Use strlcpy() instead of strncpy()

commit c288248f5b26cd5563112fcdc077bf44964a942d upstream.

hdmi_lpe_audio_probe() copies the pcm name string via strncpy(), but
as a gcc8 warning suggests, it misses a NUL terminator, and unlikely
the expected result.

Use the proper one, strlcpy() instead.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/x86/intel_hdmi_audio.c