[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: heimdal 0.3d ftp client
Brian May <email@example.com> writes:
> See <URL:http://snoopy.apana.org.au/~bam/debian/heimdal/patches/0.3d/015_ftp>.
> In short, this patch (or similar patch) is required so that ports >
> 32767 work.
You should check that the port-value was parsed ok (that is, using
strtol). If that fails you should use getservbyname(port, "tcp") to see if
it was valid port-name.
Then you'll need to check for tcp-port == 0, since it's reserved, and I'll
guess the user will be confused when the connection comes from <Dynamic
and/or Private Ports> range when they specifed 0 as port. That is what
happens when you bind to port 0, it seems to me that is just a silly way of
not specifying the port at all.