EAccessViolation during SFTP file download

Discussion of open issues, suggestions and bugs regarding network security and data protection solution - SecureBridge
Post Reply
rhoadesma
Posts: 2
Joined: Thu 28 Oct 2010 14:36
Location: Apple Valley, CA

EAccessViolation during SFTP file download

Post by rhoadesma » Thu 28 Oct 2010 15:04

I am evaluating the SecureBridge components using C++ Builder 6 to see if it will work for us. I have run into a problem.

When downloading a 25meg file I am getting an EAccessViolation in the middle of the download. If I comment out the RetrieveAttributes line, the download completes successfully.

Is this a bug in the components or am I doing something wrong?

TScSSHClient *SSHClient = new TScSSHClient( this );
TScFileStorage *KeyFileStorage = new TScFileStorage( this );
SSHClient->KeyStorage = KeyFileStorage;
SSHClient->Authentication = atPassword;
SSHClient->Port = 22;
SSHClient->HostName = "xxx";
SSHClient->User = "xxx";
SSHClient->Password = "xxx";

TScSFTPClient *SFTPClient = new TScSFTPClient( this );
SFTPClient->SSHClient = SSHClient;
SFTPClient->Version = vSFTP6;

// Initialize session
SSHClient->Connect();
SFTPClient->Initialize();

// Get the file size
TScSFTPFileAttributes *Attributes = new TScSFTPFileAttributes;
SFTPClient->RetrieveAttributes( Attributes, "/downloadtest.bin", false, TScSFTPAttributes()Size;
delete Attributes;

// Download the file
SFTPClient->DownloadFile("/downloadtest.bin", "c:\downloadtest.bin", true );

// Finish/cleanup
SFTPClient->Disconnect();
SSHClient->Disconnect();
delete SFTPClient;
delete SSHClient;
delete KeyFileStorage;

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Fri 29 Oct 2010 09:02

I could not reproduce the problem.
Please let us know the version of your SSH server and the exact version of SecureBridge.

rhoadesma
Posts: 2
Joined: Thu 28 Oct 2010 14:36
Location: Apple Valley, CA

Post by rhoadesma » Fri 29 Oct 2010 22:39

I am using WinSSHD 5.15.

I created an account on my server so you can test with it. I will PM you the details.

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Mon 01 Nov 2010 11:41

Thank you for information. We have reproduced this problem and fixed it. This fix will be included in the next SecureBridge build.

Post Reply