[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1224571649.27899.73.camel@johannes.berg>
Date: Tue, 21 Oct 2008 08:47:29 +0200
From: Johannes Berg <johannes@...solutions.net>
To: benh@...nel.crashing.org
Cc: Ingo Molnar <mingo@...e.hu>, Linus Torvalds <torvalds@...l.org>,
linux-kernel@...r.kernel.org, David Miller <davem@...emloft.net>,
linux-pci@...r.kernel.org, yhlu.kernel@...il.com,
Andrew Morton <akpm@...ux-foundation.org>,
Jesse Barnes <jbarnes@...tuousgeek.org>
Subject: Re: [PATCH] x86, ioremap: use %pR in printk
On Tue, 2008-10-21 at 08:35 +1100, Benjamin Herrenschmidt wrote:
> On Mon, 2008-10-20 at 14:58 +0200, Johannes Berg wrote:
> > On Mon, 2008-10-20 at 13:36 +0200, Ingo Molnar wrote:
> >
> > > + /* room for the actual number, the "0x" and the final zero */
> > > + char sym[2*sizeof(phys_addr_t) + 2];
> >
> > Buffer overflow.
>
> It's actually not going to overflow as we pass the end of the buffer to
> "number" but we'll miss a digit.
"buf" won't overflow, but "sym" will, no? Anyway, +3 is the correct
thing to do.
johannes
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists