]> Git Repo - linux.git/commit - sound/soc/codecs/wm_adsp.c
ASoC: wm_adsp: Fix validation of firmware and coeff lengths
authorBen Hutchings <[email protected]>
Fri, 8 Dec 2017 16:15:20 +0000 (16:15 +0000)
committerMark Brown <[email protected]>
Fri, 8 Dec 2017 17:17:35 +0000 (17:17 +0000)
commit50dd2ea8ef67a1617e0c0658bcbec4b9fb03b936
tree9d15f6975338271b7b43f8ce32d60daaf3aed018
parent4fbd8d194f06c8a3fd2af1ce560ddb31f7ec8323
ASoC: wm_adsp: Fix validation of firmware and coeff lengths

The checks for whether another region/block header could be present
are subtracting the size from the current offset.  Obviously we should
instead subtract the offset from the size.

The checks for whether the region/block data fit in the file are
adding the data size to the current offset and header size, without
checking for integer overflow.  Rearrange these so that overflow is
impossible.

Signed-off-by: Ben Hutchings <[email protected]>
Acked-by: Charles Keepax <[email protected]>
Tested-by: Charles Keepax <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Cc: [email protected]
sound/soc/codecs/wm_adsp.c
This page took 0.053882 seconds and 4 git commands to generate.