[alsa-devel] [PATCH] ASoC: core: No need to use strncmp()
Mark Brown
broonie at kernel.org
Wed Jul 31 15:23:02 CEST 2013
On Wed, Jul 31, 2013 at 12:59:29PM +0100, Dimitris Papastamos wrote:
> On Wed, Jul 31, 2013 at 12:01:47PM +0100, Mark Brown wrote:
> > One of the reasons we use strncmp() here is to avoid going beyond the
> > end of the fixed size buffer.
> Right, surely though the kcontrol names are always null terminated?
> In any case, looks more safe to strncmp().
They probably should be but it's easy to get it wrong and hit exactly
the array size.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20130731/61c252b7/attachment.sig>
More information about the Alsa-devel
mailing list