linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* arch/arm/mach-omap2/mux.c: Off by one error
@ 2010-01-31 12:16 d binderman
  2010-02-01 21:06 ` Tony Lindgren
  0 siblings, 1 reply; 4+ messages in thread
From: d binderman @ 2010-01-31 12:16 UTC (permalink / raw)
  To: tony; +Cc: linux-kernel



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/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-02-01 22:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-31 12:16 arch/arm/mach-omap2/mux.c: Off by one error d binderman
2010-02-01 21:06 ` Tony Lindgren
2010-02-01 21:17   ` Joe Perches
2010-02-01 22:05     ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).