File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/Renci.SshNet.Tests/Classes/Sftp/Requests Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -25,15 +25,15 @@ public void Init()
25
25
{
26
26
var random = new Random ( ) ;
27
27
28
- _protocolVersion = ( uint ) random . Next ( 0 , int . MaxValue ) ;
29
- _requestId = ( uint ) random . Next ( 0 , int . MaxValue ) ;
28
+ _protocolVersion = ( uint ) random . Next ( 0 , int . MaxValue ) ;
29
+ _requestId = ( uint ) random . Next ( 0 , int . MaxValue ) ;
30
30
_handle = new byte [ random . Next ( 1 , 10 ) ] ;
31
31
random . NextBytes ( _handle ) ;
32
32
_serverFileOffset = ( ulong ) random . Next ( 0 , int . MaxValue ) ;
33
33
_data = new byte [ random . Next ( 10 , 15 ) ] ;
34
34
random . NextBytes ( _data ) ;
35
- _offset = random . Next ( 0 , 4 ) ;
36
- _length = random . Next ( 5 , 10 ) ;
35
+ _offset = random . Next ( 0 , _data . Length - 1 ) ;
36
+ _length = random . Next ( 0 , _data . Length - _offset ) ;
37
37
}
38
38
39
39
[ TestMethod ]
You can’t perform that action at this time.
0 commit comments