[alsa-devel] [PATCH] ALSA: Warn when control names are truncated
Mark Brown
broonie at opensource.wolfsonmicro.com
Wed Oct 29 15:33:16 CET 2008
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).
More information about the Alsa-devel
mailing list