From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Jarosch Subject: [intel-gpu-tools PATCH] Fix out of bounds memory access Date: Tue, 25 Dec 2012 18:06:57 +0100 Message-ID: <50D9DD31.4030601@intra2net.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: 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) 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) 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: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@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; -- 1.7.11.7