From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [intel-gpu-tools PATCH] Fix out of bounds memory access Date: Sun, 6 Jan 2013 18:21:27 +0100 Message-ID: <20130106172127.GM5737@phenom.ffwll.local> References: <50D9DD31.4030601@intra2net.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-wg0-f45.google.com (mail-wg0-f45.google.com [74.125.82.45]) by gabe.freedesktop.org (Postfix) with ESMTP id 2D804E5BFD for ; Sun, 6 Jan 2013 09:19:32 -0800 (PST) Received: by mail-wg0-f45.google.com with SMTP id dq12so8750384wgb.0 for ; Sun, 06 Jan 2013 09:19:31 -0800 (PST) Content-Disposition: inline In-Reply-To: <50D9DD31.4030601@intra2net.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Thomas Jarosch Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Tue, Dec 25, 2012 at 06:06:57PM +0100, Thomas Jarosch wrote: > cppcheck reported: > [tools/intel_infoframes.c:836]: (error) Width 31 given in format string > (no. 1) is larger than destination buffer 'option[16]', > use %15s to prevent overflowing it. > > Signed-off-by: Thomas Jarosch Applied, thanks for the patch. -Daniel > --- > tools/intel_infoframes.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/intel_infoframes.c b/tools/intel_infoframes.c > index 66351ac..09fdcb9 100644 > --- a/tools/intel_infoframes.c > +++ b/tools/intel_infoframes.c > @@ -833,7 +833,7 @@ static void change_spd_infoframe(Transcoder transcoder, char *commands) > val = INREG(reg); > > while (1) { > - rc = sscanf(current, "%31s%n", option, &read); > + rc = sscanf(current, "%15s%n", option, &read); > current = ¤t[read]; > if (rc == EOF) { > break; > -- > 1.7.11.7 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch