* [PATCH] ASoC: dapm: Fix pointer dereference in is_connected_output_ep()
@ 2013-03-14 20:26 Peter Ujfalusi
2013-03-15 1:29 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Peter Ujfalusi @ 2013-03-14 20:26 UTC (permalink / raw)
To: Mark Brown, Liam Girdwood; +Cc: alsa-devel
*path is not yet initialized when we check if the widget is connected.
The compiler also warns about this:
sound/soc/soc-dapm.c: In function 'is_connected_output_ep':
sound/soc/soc-dapm.c:824:18: warning: 'path' may be used uninitialized in this function
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
Hi Mark, Liam,
This patch is for the for-next branch.
I got NULL pointer dereference because of this depending on the used toolchain.
Regards,
Peter
sound/soc/soc-dapm.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index eaf9b74..33acd8b 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -821,7 +821,6 @@ static int is_connected_output_ep(struct snd_soc_dapm_widget *widget,
(widget->id == snd_soc_dapm_line &&
!list_empty(&widget->sources))) {
widget->outputs = snd_soc_dapm_suspend_check(widget);
- path->walking = 0;
return widget->outputs;
}
}
--
1.8.1.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ASoC: dapm: Fix pointer dereference in is_connected_output_ep()
2013-03-14 20:26 [PATCH] ASoC: dapm: Fix pointer dereference in is_connected_output_ep() Peter Ujfalusi
@ 2013-03-15 1:29 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2013-03-15 1:29 UTC (permalink / raw)
To: Peter Ujfalusi; +Cc: Liam Girdwood, alsa-devel
[-- Attachment #1.1: Type: text/plain, Size: 356 bytes --]
On Thu, Mar 14, 2013 at 09:26:24PM +0100, Peter Ujfalusi wrote:
> *path is not yet initialized when we check if the widget is connected.
>
> The compiler also warns about this:
> sound/soc/soc-dapm.c: In function 'is_connected_output_ep':
> sound/soc/soc-dapm.c:824:18: warning: 'path' may be used uninitialized in this function
Applied, thanks.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-03-15 1:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-14 20:26 [PATCH] ASoC: dapm: Fix pointer dereference in is_connected_output_ep() Peter Ujfalusi
2013-03-15 1:29 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).