]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: SOF: IPC: fix implicit type overflow
authorCurtis Malainey <cujomalainey@chromium.org>
Fri, 20 Nov 2020 14:40:25 +0000 (16:40 +0200)
committerMark Brown <broonie@kernel.org>
Fri, 20 Nov 2020 16:42:14 +0000 (16:42 +0000)
commit7fcb5e222e1aa07548bf23b02ab9f9316870ecc8
tree1499ce618ae5c20e00557fb0c7cfbb48024932cb
parent90ec50c5985a6e19d848a590543cf9ddd1341ce5
ASoC: SOF: IPC: fix implicit type overflow

Implicit values may have a length of 15bits (s16) so we need to declare
the proper size so we don't get undefined behaviour. This appears to be
arch and compiler dependent. This commit is to keep the headers aligned
between the firmware and kernel. UBSan discovered this bug in the
firmware.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20201120144025.2166023-1-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/sof/header.h