]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: Don't set invalid name string to snd_card->driver field
authorTakashi Iwai <tiwai@suse.de>
Tue, 5 Jul 2011 07:25:59 +0000 (09:25 +0200)
committerTakashi Iwai <tiwai@suse.de>
Tue, 5 Jul 2011 12:39:27 +0000 (14:39 +0200)
commit258628e43addd39d6512c372d253c33ffbafff8d
tree7d18ae174562b57d195d01378fe9889366600fc5
parentecd19b7121ecb50fa61e7f840010552c9d4a55f4
ASoC: Don't set invalid name string to snd_card->driver field

The snd_card->driver field contains a driver name string, and in
general it shouldn't contain space or special letters.  The commit
1ddc0b9a3a8ce4379d5da1b77ab4ecc4fb43d433 changed the string copy from
card->name, but the long name string may contain such letters, thus
it may still lead to a segfault.

A temporary fix is not to copy the long name string but just keep it
empty as the earlier version did.

Reported-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/soc/soc-core.c