Fix incorrect cast when parsing FTP connection port

This commit is contained in:
kimci86 2022-06-23 13:00:12 +02:00 committed by Vittorio Romeo
parent 12c091e0ce
commit 618c96339b

View File

@ -558,7 +558,7 @@ Ftp::Response Ftp::DataChannel::open(Ftp::TransferMode mode)
} }
// Reconstruct connection port and address // Reconstruct connection port and address
unsigned short port = static_cast<Uint8>(data[4] * 256) + data[5]; unsigned short port = static_cast<Uint16>(data[4] * 256 + data[5]);
IpAddress address(data[0], IpAddress address(data[0],
data[1], data[1],
data[2], data[2],