lkml.org 
[lkml]   [1998]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH} ngroups, list of groups to /proc/#/status
Date
Chris Wedgwood writes:
> On Sun, Nov 22, 1998 at 05:35:28PM +0200, Topi Miettinen wrote:
>
> > + for (g = 0; g < p->ngroups; g++) {
> > + buffer += sprintf(buffer, "%d ", p->groups[g]);
> > + }
> > + buffer += sprintf(buffer, "\n");
>
> Although I wouldn't expect this to happen normally, its conceivable
> someone might one day up the maximum number of groups and in which
> case the above code might scribble of the end of the buffer....

Buffer seems to be one page, with recently suggested 32-bit ids this will
fill the entire buffer in a 4k-page system at around 373 groups. snprintf()
is not available?

-Topi



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

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