Josh Carroll wrote:
I included a limitation on the maximum length of a proto (mostly to
avoid buffer overflows) and 20 is probably way too large, so I can
lower that if need be.
I'm not sure buffer overflows are prevented:
static int
parse_protos(const char *protospec)
{
...
char
On Mon, Nov 06, 2006 at 03:17:17PM -0800, Josh Carroll wrote:
> >I suggest you use /etc/protocols rather than hard code the protocols.
> >This will make the code future-proof. See getprotoent(3) for the
> >correct way to read /etc/protocols.
>
> Thanks Peter, that's a great idea. Below is a new p
On other suggestion I'd have it to consider using strsep to parse the
string. I'm pretty the code will be smaller and more readable.
Good point. And yes, per the other mail I do need to fix the
MAX_PROTO_LEN checking, but I'll make sure that is proper when I
update it to use strsep.
Josh
Below is the patch using strsep instead. I also updated the
gather_inet function to print a message that a protocol is not
supported if it exists in /etc/protocols, but does not have a case in
the gather_inet function.
patch is here if you'd rather just fetch it:
http://pflog.net/~floyd/sockstat
John Baldwin wrote:
> On Thursday 02 November 2006 15:10, Julian H. Stacey wrote:
> > John Baldwin wrote:
> > > On Thursday 02 November 2006 05:50, Julian Stacey wrote:
> > > > NFS fails on files >= 4 Gig Can someone confirm please.
> > > >
> > > > uname -r# 6.1-RELEASE (both hosts
Hi;
>From http://blogs.sun.com/bonwick/date/200512
"At this writing, SEEK_HOLE and SEEK_DATA are Solaris-specific. I encourage
(implore? beg?) other operating systems to adopt these lseek(2) extensions
verbatim (100% tax-free) so that sparse file navigation becomes a ubiquitous
feature that every
6 matches
Mail list logo