SFTP: avoid downloading negative sizes!
authorDaniel Stenberg <daniel@haxx.se>
Thu, 30 Sep 2010 21:08:37 +0000 (23:08 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 30 Sep 2010 21:08:37 +0000 (23:08 +0200)
commit5f0ae7a0626cbe70944c67065292cbb056d0a7c9
tree6a239bb6085974cbcac6b6d5aa5231d3788b1cb4
parent8fa519dce4746f35c4ad20020e9cc884d3a2549b
SFTP: avoid downloading negative sizes!

It is still not clarified exactly why this happens, but libssh2
sometimes report a negative file size for the remote SFTP file and that
deeply confuses libcurl (or crashes it) so this precaution is added to
avoid badness.

Reported by: Ernest Beinrohr
Bug: http://curl.haxx.se/bug/view.cgi?id=3076430
lib/ssh.c