Skip to content

Commit

Permalink
check fields len in dns.go
Browse files Browse the repository at this point in the history
  • Loading branch information
Chen Peng committed Aug 14, 2017
1 parent 854da22 commit 03a6ffd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/pkg/net/dns/dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func GetSystemNameServers() ([]net.IP, error) {
continue
}
fields := strings.Fields(trimmed)
if len(fields) == 0 {
if len(fields) < 2 {
continue
}
if fields[0] == "nameserver" {
Expand Down

0 comments on commit 03a6ffd

Please sign in to comment.