Check index length.

This commit is contained in:
David Kocher
2014-05-08 16:17:43 +02:00
parent 131e85c4d0
commit 63424657da
3 changed files with 10 additions and 1 deletions

View File

@@ -200,7 +200,10 @@ public class OpenSSHKnownHosts
if (marker != null) {
i++;
}
if(split.length < 3) {
LOG.error("Error reading entry `{}`", line);
return null;
}
final String hostnames = split[i++];
final String sType = split[i++];