From patchwork Tue Dec 25 17:06:57 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Jarosch X-Patchwork-Id: 1937791 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 3DC54DF2A2 for ; Sun, 6 Jan 2013 17:14:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CFE11E5C7A for ; Sun, 6 Jan 2013 09:14:27 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org X-Greylist: delayed 1045 seconds by postgrey-1.32 at gabe; Tue, 25 Dec 2012 09:24:25 PST Received: from re04.intra2net.com (re04.intra2net.com [82.165.46.26]) by gabe.freedesktop.org (Postfix) with ESMTP id E4588E5C36 for ; Tue, 25 Dec 2012 09:24:25 -0800 (PST) Received: from intranator.m.i2n (unknown [172.16.1.99]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by re04.intra2net.com (Postfix) with ESMTP id 4A7413012A for ; Tue, 25 Dec 2012 18:06:59 +0100 (CET) Received: from localhost (intranator.m.i2n [127.0.0.1]) by localhost (Postfix) with ESMTP id 205802AC57 for ; Tue, 25 Dec 2012 18:06:59 +0100 (CET) X-Virus-Scanned: by Intranator (www.intra2net.com) with AMaViS and F-Secure AntiVirus (fsavdb 2012-12-25_05) X-Spam-Status: X-Spam-Level: 0 Received: from pikkukde.a.i2n (unknown [192.168.12.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: smtp-auth-user) by intranator.m.i2n (Postfix) with ESMTPSA id DAB392AC54 for ; Tue, 25 Dec 2012 18:06:57 +0100 (CET) Message-ID: <50D9DD31.4030601@intra2net.com> Date: Tue, 25 Dec 2012 18:06:57 +0100 From: Thomas Jarosch User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: intel-gfx@lists.freedesktop.org X-Mailman-Approved-At: Sun, 06 Jan 2013 09:14:13 -0800 Subject: [Intel-gfx] [intel-gpu-tools PATCH] Fix out of bounds memory access X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org 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 --- 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;