[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: netkit-ftp-0.17



On Tue, Jul 24, 2001, Ariel Biener wrote about "netkit-ftp-0.17":
>    Someone decided to use "unsigned short" for the ftp peer port number,
> so you cannot ftp hosts with port larger than 32767. I don't know who
> deals with it among you guys, but I am sure you can bounce it to the right
> person:

But an unsigned short can hold numbers between 0 and 65535 (2^16-1), so that
an unsigned short should indeed be enough...

The wrong code is likely another piece of code that does something like
casting the unsigned short into a signed short, or something like that, and
then checking if it is <0, or whatever.

Anyway, changing "unsigned short" to "unsigned int" might fix the problem,
but it doesn't appear to be the most "correct" fix. Of course, I haven't looked
at the code so I might be wrong.

-- 
Nadav Har'El                        |          Tuesday, Jul 24 2001, 4 Av 5761
nyh@math.technion.ac.il             |-----------------------------------------
Phone: +972-53-245868, ICQ 13349191 |Linux: Because rebooting is for adding
http://nadav.harel.org.il           |new hardware.

=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il