]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: hda: intel-nhlt: Correct the handling of fmt_config flexible array
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Tue, 23 Aug 2022 12:24:05 +0000 (15:24 +0300)
committerTakashi Iwai <tiwai@suse.de>
Wed, 24 Aug 2022 05:59:10 +0000 (07:59 +0200)
commit614eb3d816b32520a9ddf0ceb488d8e6c1286a27
tree58d86bd83ff420dcf613de635cca54bc8e0fe88e
parent691a6cf5640991d006e44c0e82dd9c9586ef10bc
ALSA: hda: intel-nhlt: Correct the handling of fmt_config flexible array

The struct nhlt_format's fmt_config is a flexible array, it must not be
used as normal array.
When moving to the next nhlt_fmt_cfg we need to take into account the data
behind the ->config.caps (indicated by ->config.size).

Fixes: 42dcc59728836 ("ALSA: hda: intel-nhlt: verify config type")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Jaska Uimonen <jaska.uimonen@linux.intel.com>
Link: https://lore.kernel.org/r/20220823122405.18464-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/hda/intel-nhlt.c