]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
ALSA: intel_hdmi: Use strlcpy() instead of strncpy()
authorTakashi Iwai <tiwai@suse.de>
Wed, 27 Jun 2018 12:59:00 +0000 (14:59 +0200)
committerSultan Alsawaf <sultan.alsawaf@canonical.com>
Wed, 24 Jul 2019 15:45:00 +0000 (09:45 -0600)
commitfd4cbed2886183a67e30992101a43cdb7405eac3
treedec3b193047adffada3eaea9727d33ba06f1b823
parentf8c767e7d9a53c43528d19a20064385f09f6c397
ALSA: intel_hdmi: Use strlcpy() instead of strncpy()

BugLink: https://bugs.launchpad.net/bugs/1837161
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>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
sound/x86/intel_hdmi_audio.c