lkml.org 
[lkml]   [2005]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] vsprintf.c cleanups
From
Date
On Fri, 2005-02-25 at 07:28 -0500, Brian Gerst wrote:
> Horst von Brand wrote:
> > Brian Gerst <bgerst@didntduck.org> said:
> >
> >>- Make sprintf call vsnprintf directly
> >>- use INT_MAX for sprintf and vsprintf
> >
> >
> > This is the size limit on what is written. 4GiB sounds a bit extreme...
>
> Sprintf has no limit, which is why it's generally bad to use it. I just
> replaced an open coded ((~0U)>>1) value with the equivalent INT_MAX.

I can see the point of using PAGE_SIZE instead; and if someone really
wants more than that, he/she should use snprintf with a specified
size....



-
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/

\
 
 \ /
  Last update: 2005-03-22 14:10    [W:0.054 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site