[PATCH] Don't bind to registered ports in bindresvport

Mike Frysinger vapier@gentoo.org
Thu Jun 7 02:26:00 GMT 2012


On Friday 01 June 2012 23:03:53 Carlos O'Donell wrote:
> On Fri, Jun 1, 2012 at 4:01 PM, Dan Nicholson wrote:
> >   int nports = ENDPORT - startport + 1;
> >   int endport = ENDPORT;
> > +  bool_t chkport = TRUE;
> > +  struct servent serv;
> > +  char buf[1024];
> 
> A global static buffer of this size should come from malloc (and get
> allocated once).

eh ?  it's declared on the stack ... not sure what you mean about global or 
static.  it's pretty much the same thing as calling alloca(1024).
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20120607/814272c0/attachment.sig>


More information about the Libc-alpha mailing list