Re: [PATCH] ALSA: Warn when control names are truncated

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 29, 2008 at 03:28:50PM +0100, Takashi Iwai wrote:
> 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.

Oh, sorry - I'd misread strlcpy() as strncpy() (which would mean that
the termination character wasn't needed).
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux