[alsa-devel] [PATCH] ASoC: Ensure we generate a driver name

Mark Brown broonie at opensource.wolfsonmicro.com
Tue Sep 20 15:18:05 CEST 2011


On Tue, Sep 20, 2011 at 03:11:08PM +0200, Takashi Iwai wrote:
> Mark Brown wrote:

> > +	snprintf(card->snd_card->driver, sizeof(card->snd_card->driver),
> > +		 "%s", card->driver_name ? card->driver_name : card->name);
> > +	for (i = 0; i < ARRAY_SIZE(card->snd_card->driver); i++) {

> Should check card->snd_card->driver[i] != 0 here, too.

*sigh*  This sort of issue is why I'd prefer to just squash specific
characters, especially given that we're just being random about what a
valid character is.


More information about the Alsa-devel mailing list