ASoC: wm_adsp: Don't overrun firmware file buffer when reading region data
authorRichard Fitzgerald <rf@opensource.wolfsonmicro.com>
Tue, 20 Dec 2016 10:29:12 +0000 (10:29 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Nov 2017 08:35:55 +0000 (08:35 +0000)
commitd3e2563be9273a5fa159ed94a6dff2df09ef4a2e
treea87606013505cd94a89ff161260bfa220a8109bf
parenta387098fe030a94e7cb454c687e4cc5a05857763
ASoC: wm_adsp: Don't overrun firmware file buffer when reading region data

[ Upstream commit 1cab2a84f470e15ecc8e5143bfe9398c6e888032 ]

Protect against corrupt firmware files by ensuring that the length we
get for the data in a region actually lies within the available firmware
file data buffer.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/soc/codecs/wm_adsp.c