ASoC: Intel: sof_rt5682: fix out-of-bounds array access
authorBrent Lu <brent.lu@intel.com>
Fri, 1 Jul 2022 14:15:17 +0000 (22:15 +0800)
committerMark Brown <broonie@kernel.org>
Thu, 7 Jul 2022 16:16:37 +0000 (17:16 +0100)
commitc7dab6745f4288af1e45d3809bf86a3778301616
treeb3fa63a912383697828b759dc2454a13c2c0c45c
parentdf5b4aca7248dc5a5cae93f162eae0decf972e48
ASoC: Intel: sof_rt5682: fix out-of-bounds array access

Starting from ADL platform we have four HDMI PCM devices which exceeds
the size of sof_hdmi array. Since each sof_hdmi_pcm structure
represents one HDMI PCM device, we remove the sof_hdmi array and add a
new member hdmi_jack to the sof_hdmi_pcm structure to fix the
out-of-bounds problem.

Signed-off-by: Brent Lu <brent.lu@intel.com>
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20220701141517.264070-1-brent.lu@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/boards/sof_rt5682.c