mirror of
https://github.com/hierynomus/sshj.git
synced 2025-12-08 08:10:55 +03:00
Remove length restriction in key reader. (#595)
This commit is contained in:
@@ -321,9 +321,6 @@ public class PuTTYKeyFile extends BaseFileKeyProvider {
|
||||
|
||||
private byte[] read() throws IOException {
|
||||
int len = di.readInt();
|
||||
if (len <= 0 || len > 513) {
|
||||
throw new IOException(String.format("Invalid length %d", len));
|
||||
}
|
||||
byte[] r = new byte[len];
|
||||
di.readFully(r);
|
||||
return r;
|
||||
|
||||
Reference in New Issue
Block a user