]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ALSA: echoaudio: Fix memory allocation
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Mon, 27 Jun 2016 19:06:51 +0000 (21:06 +0200)
committerDhaval Giani <dhaval.giani@oracle.com>
Fri, 20 Jan 2017 22:22:04 +0000 (17:22 -0500)
commitaed212522fdd77e4625e5c24ec1d0355b9995364
tree3fedbf69d4a4686eb485358f44ad9c4cd30e4b7d
parentbd9d3ba50a4cfb87eef4d6a9823c4494c7fd18cb
ALSA: echoaudio: Fix memory allocation

Orabug: 25308093

[ Upstream commit 9c6795a9b3cbb56a9fbfaf43909c5c22999ba317 ]

'commpage_bak' is allocated with 'sizeof(struct echoaudio)' bytes.
We then copy 'sizeof(struct comm_page)' bytes in it.
On my system, smatch complains because one is 2960 and the other is 3072.

This would result in memory corruption or a oops.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
(cherry picked from commit 029161e90ca98d024061cb50b0934b1ea06046b5)
Signed-off-by: Dhaval Giani <dhaval.giani@oracle.com>
sound/pci/echoaudio/echoaudio.c