ASoC: Intel: Fix a buffer overflow issue
Subsystems (3)
PATCH 1/1 ASoC: Intel: Fix a buffer overflow issue
0day robot reported a buffer overflow issue:
...sound/soc/intel/haswell/sst-haswell-pcm.c:1107 hsw_pcm_probe() error: buffer\
overflow 'hsw_dais' 4 <= 4 sound/soc/intel/haswell/sst-haswell-pcm.c:1109 hsw_pcm_probe() error: buffer\
overflow 'hsw_dais' 4 <= 4
...
Fix it by initializing the index(i) to correct value.
Signed-off-by Jie Yang <[email protected]>
--- sound/soc/intel/haswell/sst-haswell-pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/intel/haswell/sst-haswell-pcm.c +1 -1
@@ -1103,7 +1103,7 @@ static int hsw_pcm_probe(struct snd_soc_platform *platform)return 0 ; err: -for (;i >=0 ; i--) { +for (--i; i >=0 ; i--) {if (hsw_dais[i].playback.channels_min)snd_dma_free_pages (&priv_data->dmab[i][0 ]);if (hsw_dais[i].capture.channels_min)
Signature · 1 line
1.9.1
Quoted 1 line · Jie Yang
0day robot reported a buffer overflow issue:
Applied, thanks.