Summary: | net-analyzer/netcat crashes on connection to on ports over 999,999 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Eric Gisse <jowr.pi> |
Component: | Current packages | Assignee: | SpanKY <vapier> |
Status: | RESOLVED FIXED | ||
Severity: | trivial | CC: | netmon |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Eric Gisse
2011-06-09 15:38:37 UTC
ignoring the fact that ports over 65535 arent even valid ... That's why this is Cute Bug of the Year. ive committed a fix upstream for the issue --- netcat.c (revision 20) +++ netcat.c (revision 21) @@ -100,7 +100,6 @@ struct port_poop { char name [64]; /* name in /etc/services */ - char anum [8]; /* ascii-format number */ USHORT num; /* real host-order number */ }; #define PINF struct port_poop @@ -493,7 +492,6 @@ gp_finish: /* Fall here whether or not we have a valid servent at this point, with x containing our [host-order and therefore useful, dammit] port number */ - sprintf (portpoop->anum, "%d", x); /* always load any numeric specs! */ portpoop->num = (x & 0xffff); /* ushort, remember... */ return (portpoop->num); } /* getportpoop */ |