Merge pull request #10933 from ChrisRx/fix-embed-panic

embed: fix oob panic in zap logger
release-3.4
Gyuho Lee 2019-07-25 06:56:31 -07:00 committed by GitHub
commit c5dba11197
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -242,7 +242,7 @@ func (cfg *Config) setupLogging() error {
serverName := state.ServerName
if len(state.PeerCertificates) > 0 {
cert := state.PeerCertificates[0]
ips := make([]string, 0, len(cert.IPAddresses))
ips := make([]string, len(cert.IPAddresses))
for i := range cert.IPAddresses {
ips[i] = cert.IPAddresses[i].String()
}