Subject: Re: [libssh2] #249: sftp download data corruption

Re: [libssh2] #249: sftp download data corruption

From: libssh2 Trac <>
Date: Wed, 17 Oct 2012 14:09:08 -0000

#249: sftp download data corruption
  Reporter: maxmtl | Owner:
      Type: defect | Status: new
  Priority: normal | Milestone: 1.4.3
 Component: SFTP | Version: 1.4.2
Resolution: | Keywords:
Blocked By: | Blocks:

Comment (by maxmtl):

 Thanks for your time.

 I will have to talk with the Java guys here about the Mina SSHD patch. I
 think they redid the same correction.

 I agree that this is somewhat of a kludge. We have to work with old
 versions of our software (both embedded and java/pc-based), so this looked
 like the right solution.

 I have been mislead by Openssh's sftp client working correctly. So I
 (finally) took a look into the Openssh sftp client code. It goes fatal()
 when it receives more data than requested, but since it always asks for
 32768 bytes it works correctly with old versions of Mina SSHD. Maybe that
 would be the correct solution in our case.

 Should I submit a patch that aborts when the received size is longer than

Ticket URL: <>
libssh2 <>
C library for writing portable SSH2 clients
Received on 2012-10-17