]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerTakashi Iwai <tiwai@suse.de>
Fri, 22 Aug 2014 05:21:05 +0000 (07:21 +0200)
commit9d8c4ddd4991c76bceba9a0d5c7dbbd7b42f1730
tree8558903d00277fdb90191da087927fe66a1dd130
parent5ae87d3786427ddb09e4c0863bfcc67e57d22644
ALSA: core: fix buffer overflow in snd_info_get_line()

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>
Cc: <stable@vger.kernel.org> # v2.2.26+
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/info.c