some FTP servers return 32bit port numbers.

This commit is contained in:
Stefan Esser 2002-10-04 22:20:08 +00:00
parent 3340e82508
commit 4368b8e4ac

View File

@ -602,7 +602,7 @@ ftp_pasv(ftpbuf_t *ftp, int pasv)
n++;
}
sin6->sin6_port = htons((unsigned short) strtol(ptr, &endptr, 10));
sin6->sin6_port = htons((unsigned short) strtoul(ptr, &endptr, 10));
if (ptr == endptr || *endptr != delimiter)
return 0;