[alsa-devel] [PATCH] ALSA: Warn when control names are truncated

Takashi Iwai tiwai at suse.de
Wed Oct 29 15:28:50 CET 2008


At Wed, 29 Oct 2008 14:14:54 +0000,
Mark Brown wrote:
> 
> -	if (ncontrol->name)
> +	if (ncontrol->name) {
> +		if (strlen(ncontrol->name) > sizeof(kctl.id.name))

This should be '>=' since strlen() doesn't count the terminator.


thanks,

Takashi


More information about the Alsa-devel mailing list