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:52:11 +0000 (14:52 -0700)
commit80669110f1e6d653448179e12d40cd8a713ee4a0
tree3ced917c84061c311bc55378014b70d17bfda576
parentf1cb0494aa7cdec998bb63ead445de5f959ce625
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