From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Carpenter Date: Thu, 06 Oct 2011 14:30:38 +0000 Subject: Re: [patch] [SCSI] aacraid: use lower snprintf() limit Message-Id: <20111006143038.GC18470@longonot.mountain> List-Id: References: <20111005055046.GD32077@elgon.mountain> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Achim Leubner Cc: Rolf Eike Beer , Adaptec OEM Raid Solutions , "James E.J. Bottomley" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org On Wed, Oct 05, 2011 at 05:19:12AM -0700, Achim Leubner wrote: > Looks good so far. But do we really need the last two lines? > > + if (len > 16) > > + len = 16; > snprintf() returns the number of characters that it _would_ have copied if it had space. We want to return the number of bytes actually copied. Again, the snprintf() values do fit so this change doesn't actually make any difference. regards, dan carpenter