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

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

From: libssh2 Trac <>
Date: Tue, 16 Oct 2012 22:23:05 -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 bagder):

 That's a violation of the spec from the server's side.

 Both the -5 draft as well as the latest -13 draft mentions that it should
 not return more data than the 'length' as given in the SSH_FXP_READ

 I would rather argue that when detecting that the data is larger than
 requested, it should probably bail out since there's no way for it to know
 what data it got and how to handle it. I think your fix is somewhat of a
 kludge that works for this particular broken server but we can't tell how
 other broken servers will respond with wrong sizes.

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