From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932474AbbFISAs (ORCPT ); Tue, 9 Jun 2015 14:00:48 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:50645 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752915AbbFISAj (ORCPT ); Tue, 9 Jun 2015 14:00:39 -0400 Date: Tue, 9 Jun 2015 19:00:28 +0100 From: Mark Brown To: Stefan Wahren Cc: Liam Girdwood , Joe Perches , linux-kernel@vger.kernel.org, stable@vger.kernel.org Message-ID: <20150609180028.GT14071@sirena.org.uk> References: <1433368589-16806-1-git-send-email-stefan.wahren@i2se.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="WIi9HWrkIHEbt6jj" Content-Disposition: inline In-Reply-To: <1433368589-16806-1-git-send-email-stefan.wahren@i2se.com> X-Cookie: The end of labor is to gain leisure. User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: 94.175.94.161 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [PATCH V2] regulator: core: fix constraints debug output X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --WIi9HWrkIHEbt6jj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Jun 03, 2015 at 09:56:29PM +0000, Stefan Wahren wrote: > The line buffer for constraints debug isn't big enough to hold the output > in all cases. So fix the possible buffer overflow by the usage of the > scnprintf(). If we know how much output we might produce then why not extend the buffer so we don't need to cut it off? The defensive programming is good but that seems a better fix. --WIi9HWrkIHEbt6jj Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJVdym7AAoJECTWi3JdVIfQuToH/jnjO4KW6Wa8BQz4wnSAtuBR uZN6bortkZruHZ7CM2tQszXKvm1xVQ3FS8MY6IIIm/MtwqSqXSnfFLd1VJQV47XD VK8zODR71xRNcKMPWX/z8QhY89zQ+AJY0PAyre7hO0tAjrh1u6+iedRuhnK03hbI ElKcKTfyc8WGX6Aijdr2ImdUBv+rlKnHyH6CaIaQ2cfRLHQiu4yk48EYwBpcG5SO +niDhxqzmBGUTpNK1eW4Aw0X9+7nV75LU9GVCFUi7kKvJIi2uQ0HKqHqDiJ5YyEl N44loTcJDiGp4JjxjabD0lx3T74927ZUXRiO64kZKBxwtRKBeBI4b+Fo4Jo6Ms8= =O2ij -----END PGP SIGNATURE----- --WIi9HWrkIHEbt6jj--