SIZE command not returning correct value from server

I know this is known issue but I wanted to report my problems and proposal a workaround...

SmartFTP v1.5.988.35
Resolving host name "********"
Connecting to ******* Port: 21
Connected to ******.
220 ********* FTP server (Version wu-2.6.2-15.7x.legacy) ready.
USER ****
331 Password required for ******.
PASS (hidden)
230 User ***** logged in.
SYST
215 UNIX Type: L8
FEAT
500 'FEAT': command not understood.
TYPE I
200 Type set to I.
REST 0
350 Restarting at 0. Send STORE or RETRIEVE to initiate transfer.
PWD
257 "/home/customers/****" is current directory.
PASV
227 Entering Passive Mode (**********)
Opening data connection to ****** Port: 6260
LIST -aL
150 Opening BINARY mode data connection for directory listing.
1352 bytes transferred. (26,4 KB/s) (50 ms)
226 Transfer complete.
SIZE _SETUP.DLL
550 _SETUP.DLL: not a plain file.
PASV
227 Entering Passive Mode (********)
Opening data connection to ****** Port: 46739
STOR _SETUP.DLL
150 Opening BINARY mode data connection for _SETUP.DLL.
152576 bytes transferred. (38,6 KB/s) (00:00:03)
226 Transfer complete.
SIZE _SETUP.DLL
213 -5197704266965167104
File size mismatch.
PASV
227 Entering Passive Mode (*********)
Opening data connection to ******** Port: 33590
LIST -aL
150 Opening BINARY mode data connection for directory listing.
1419 bytes transferred. (23,0 KB/s) (60 ms)
226 Transfer complete.
Transfer successful.


+- System -----------------------------
Microsoft Windows XP Professional
(Build 2600)

CPU Speed : 796 MHz
Total Memory : 522736 KB
Free Memory : 273092 KB

+- SmartFTP ---------------------------
Version : 1.5.988.35
Time Stamp : 2005-07-09 00:44:42

+- Application DLL --------------------
controls.dll : 1.6.988.35
sfFTPLib.dll : 1.0.1.40

+- Language ---------------------------
SmartFTP.exe : 1.5.988.35

+- System DLL -------------------------
shell32.dll : 6.00.2600.115 (xpclnt_qfe.021108-2107)
shlwapi.dll : 6.00.2730.1200
comctl32.dll : 6.0 (xpclient.010817-1148)
riched20.dll : 5.30.23.1210
schannel.dll : 5.1.2600.136 (xpclnt_qfe.021108-2107)

+- Internet Explorer ------------------
Version : 6.0.2600.0000

+- Winsock ----------------------------
Winsock : 2.2

extra info:
Because of my extreme security level I don't like allow active mode.

I have reported the bug for my host so I hope there will be server side fix.

I'm using my laptop with speedstep ;)

Problem:
SIZE command returns random large value that is negative or positive. When I try to use global gueue that result to looping upload even I select ignore errors because smart ftp think transfer failed.

Reproduce:
transfer any file to or from a broken ftp server. (This isn't smart ftp bug but smart ftp could have work around)

current work around:
Use ascii mode (only for text), no work around for binary data that I know

possible work around in software:
A) try to detect if size command returns wrong values and ignore it.
B) Possible to select if SIZE command is used after transfer (I would like to see this as server option because I have this problem only in one server)

Thanks.

Excellent report. Please install the latest version from:
https://www.smartftp.com/download

Negative values are now ignored in SIZE replies.

-Mat

Thanks for fix.

I tested it with few hundred files and no problems any more. I was just traveling so I couldn't test it earlier.

PS. It's easy to make bug reports because I'm profesional programer. I have spent lot of time trying to solve what bug reports are trying to say.