From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753377AbbEUGm4 (ORCPT ); Thu, 21 May 2015 02:42:56 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:50324 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751193AbbEUGmx (ORCPT ); Thu, 21 May 2015 02:42:53 -0400 Date: Thu, 21 May 2015 08:42:43 +0200 (CEST) From: Stefan Wahren Reply-To: Stefan Wahren To: Joe Perches Cc: Liam Girdwood , linux-kernel@vger.kernel.org, Mark Brown , stable@vger.kernel.org Message-ID: <2047496795.32464.1432190563718.JavaMail.open-xchange@oxbsltgw07.schlund.de> In-Reply-To: <1432154105.20840.8.camel@perches.com> References: <1432153029-2342-1-git-send-email-stefan.wahren@i2se.com> <1432154105.20840.8.camel@perches.com> Subject: Re: [PATCH] regulator: core: fix constraints debug output MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Medium X-Mailer: Open-Xchange Mailer v7.6.2-Rev17 X-Originating-Client: com.openexchange.ox.gui.dhtml X-Provags-ID: V03:K0:2nxhLMn680HkxaGtTsgFTt/sFGQEiaevWO3rXqihrRwyFnbYJws 1+jtWLaEGD85OwVk04bt2gvwy1wvYF9dvkgn53Wm3OWi8T856r/kQuyYwNx8i7wgqV2qPDQ mAfWF5uZ8Mqem+xtO6LrXygEu2r/jDSn7GrSyBn7dJHiCJo/+JTabPMtlNu8OVcL4nDbUSj C5ePtUV5nu5hPecWP3fmQ== X-UI-Out-Filterresults: notjunk:1; Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Joe, > Joe Perches hat am 20. Mai 2015 um 22:35 geschrieben: > > > On Wed, 2015-05-20 at 20:17 +0000, Stefan Wahren wrote: > > In the case uV_offset is greater than 0 the debug output before > > is accidentally overwritten. So take care of the output count. > > If you are going to take care, please change all of these > sprintf calls to snprintf. thanks for pointing out. I will create a second version. But using scnprintf should be better here. > > The buf array may not be big enough [80] to hold the longest > possible output string. > Stefan