]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: SOF: topology: Prevent NULL pointer dereference with no TLV
authorRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Mon, 1 Feb 2021 09:31:28 +0000 (11:31 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 1 Feb 2021 13:18:58 +0000 (13:18 +0000)
commit8231678241a9c1f55f9fb08b1a1a46e7b4397402
treea1a35290c9989035373777499230de9206ea5472
parent8d60a17c6f34c80122ce99118515427a3d5a3639
ASoC: SOF: topology: Prevent NULL pointer dereference with no TLV

When there is no TLV data in topology, extracting the TLV data
could result in a NULL pointer exception. Prevent this by making
sure that the TLV data exists before extracting it.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Paul Olaru <paul.olaru@oss.nxp.com>
Reviewed-by: Bard Liao <bard.liao@intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20210201093128.1226603-1-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/topology.c