lkml.org 
[lkml]   [2008]   [Oct]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] x86, ioremap: use %pR in printk
From
Date
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
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2008-10-21 08:51    [W:0.786 / U:0.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site