[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87il5aomh1.wl-kuninori.morimoto.gx@renesas.com>
Date: Thu, 7 Dec 2023 01:00:50 +0000
From: Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>
To: Dan Carpenter <dan.carpenter@...aro.org>
Cc: Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>, Rob Herring <robh@...nel.org>,
Charles Keepax <ckeepax@...nsource.cirrus.com>,
Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>, linux-sound@...r.kernel.org,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] ASoC: audio-graph-card2: fix off by one in graph_parse_node_multi_nm()
Hi Dan
> The > comparison should be >= to avoid writing one element beyond the end
> of the dai_link->ch_maps[] array. The dai_link->ch_maps[] array is
> allocated in graph_parse_node_multi() and it has "nm_max" elements.
>
> Fixes: e2de6808df4a ("ASoC: audio-graph-card2: add CPU:Codec = N:M support")
> Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>
> ---
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>
> In this same function I was also concerned about these conditions:
>
> if (cpu_idx > dai_link->num_cpus)
> if (codec_idx > dai_link->num_codecs)
>
> But I wasn't able to see out how those idx variables are actually
> used.
These also ">=" I think.
Thank you for pointing it
Best regards
---
Renesas Electronics
Ph.D. Kuninori Morimoto
Powered by blists - more mailing lists