-
-
Notifications
You must be signed in to change notification settings - Fork 940
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix avoidable exception when data length is too long #823
Conversation
…r than int.maxvalue are ignored and do not throw an exception
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should change/remove test Load_ShouldThrowNotSupportedExceptionWhenDataLengthIsGreaterThanInt32MaxValue for this PR to pass.
I have removed the unit test as I cannot think of a way to enter into the middle condition,
Perhaps this condition should be removed entirely. |
With the current implementation of SshData I believe you cannot test this case. |
Fix #713 added to first comment as requested |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
I wish there was a test, but I know it will be difficult.
The 2023.0.1 version has been released to Nuget: https://www.nuget.org/packages/SSH.NET/2023.0.1 |
Fix #713
Fix #1243
Data lengths that are both longer than int.MaxValue and data bytes are now ignored and do not throw an exception.
This would come up when connecting to a Tectia SFTP server running on a mainframe.
Credit to @edmlin for the fix. This is for issue #713