]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: SOF: fix 32 signed bit overflow
authorCurtis Malainey <cujomalainey@chromium.org>
Fri, 4 Mar 2022 20:57:31 +0000 (14:57 -0600)
committerMark Brown <broonie@kernel.org>
Mon, 7 Mar 2022 13:12:52 +0000 (13:12 +0000)
commite1da88f2412a67e75890cfbb32c46e585f45f09e
treecdd0e2a11cabcd1a9fd2285dc75686cb07d0a6b0
parenta097afc91e83d2ed51749a5ce4a7a529e9589964
ASoC: SOF: fix 32 signed bit overflow

Shifting in a signed 32bit container past the signed bit is technically
undefined behaviour. Fix by using unsigned types. Found via cppcheck.

Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220304205733.62233-9-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/sof/header.h
include/uapi/sound/sof/abi.h