From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [PATCH] ALSA: Warn when control names are truncated Date: Wed, 29 Oct 2008 15:28:50 +0100 Message-ID: References: <1225289694-25584-1-git-send-email-broonie@opensource.wolfsonmicro.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx1.suse.de (ns.suse.de [195.135.220.2]) by alsa0.perex.cz (Postfix) with ESMTP id 7854324443 for ; Wed, 29 Oct 2008 15:28:50 +0100 (CET) In-Reply-To: <1225289694-25584-1-git-send-email-broonie@opensource.wolfsonmicro.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Mark Brown Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org 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