fix array OOB panic (#100)

This commit is contained in:
Dave Grijalva 2015-11-13 12:50:04 -08:00
parent 52c68d1293
commit dd0ede9741
1 changed files with 4 additions and 1 deletions

View File

@ -205,5 +205,8 @@ func signToken() error {
}
func isEs() bool {
return (*flagAlg)[0:2] == "ES"
if alg := *flagAlg; len(alg) >= 2 && alg[0:2] == "ES" {
return true
}
return false
}