Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753306Ab0AaMQy (ORCPT ); Sun, 31 Jan 2010 07:16:54 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752655Ab0AaMQx (ORCPT ); Sun, 31 Jan 2010 07:16:53 -0500 Received: from blu0-omc4-s9.blu0.hotmail.com ([65.55.111.148]:62460 "EHLO blu0-omc4-s9.blu0.hotmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752612Ab0AaMQw convert rfc822-to-8bit (ORCPT ); Sun, 31 Jan 2010 07:16:52 -0500 Message-ID: X-Originating-IP: [87.81.120.187] From: d binderman To: CC: Subject: arch/arm/mach-omap2/mux.c: Off by one error Date: Sun, 31 Jan 2010 12:16:52 +0000 Importance: Normal Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OriginalArrivalTime: 31 Jan 2010 12:16:51.0532 (UTC) FILETIME=[44F2E8C0:01CAA26F] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 952 Lines: 41 Hello there, I just ran the sourceforge tool cppcheck over the source code of the new Linux kernel 2.6.33-rc6 It said [./arm/mach-omap2/mux.c:492]: (error) Buffer access out-of-bounds The source code is ??????? char mode[14]; ??????? int i = -1; ??????? sprintf(mode, "OMAP_MUX_MODE%d", val & 0x7); 13 characters + 1 digit + 1 zero byte is more than 14 characters. Suggest new code ??????? char mode[15]; ??????? int i = -1; ??????? sprintf(mode, "OMAP_MUX_MODE%d", val & 0x7); Regards David Binderman _________________________________________________________________ Tell us your greatest, weirdest and funniest Hotmail stories http://clk.atdmt.com/UKM/go/195013117/direct/01/-- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/