ALSA: core: fix buffer overflow in snd_info_get_line()
authorClemens Ladisch <clemens@ladisch.de>
Thu, 21 Aug 2014 18:55:21 +0000 (20:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 5 Oct 2014 21:54:07 +0000 (14:54 -0700)
commitb2a014bc3d20aab7789c92c7549b98b9e0c34383
treef4945c813951e0ac82b9b88d5d8e58a01b5f985f
parent73ab9689158dd27735252037e036cd908a0db65a
ALSA: core: fix buffer overflow in snd_info_get_line()

commit ddc64b278a4dda052390b3de1b551e59acdff105 upstream.

snd_info_get_line() documents that its last parameter must be one
less than the buffer size, but this API design guarantees that
(literally) every caller gets it wrong.

Just change this parameter to have its obvious meaning.

Reported-by: Tommi Rantala <tt.rantala@gmail.com>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/core/info.c