Prevent possible NPE in SshUtil
Change-Id: I683c33c8c9f655c9fd8f2091b0c6f0483e362e71
This commit is contained in:
@@ -79,7 +79,7 @@ public class SshUtil {
|
||||
final StringBuilder strBuf = new StringBuilder();
|
||||
final BufferedReader br = new BufferedReader(new StringReader(keyStr));
|
||||
String line = br.readLine(); // BEGIN SSH2 line...
|
||||
if (!line.equals("---- BEGIN SSH2 PUBLIC KEY ----")) {
|
||||
if (line == null || !line.equals("---- BEGIN SSH2 PUBLIC KEY ----")) {
|
||||
return keyStr;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user