From: Alexey Borzenkov Date: Thu, 1 Nov 2012 16:57:44 +0000 (-0400) Subject: net: fix a bad cast in dnsmsg.go X-Git-Tag: go1.1rc2~2002 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=1eae1252e9ba5d11f637e656617e804ce7990c3d;p=gostls13.git net: fix a bad cast in dnsmsg.go Incorrect cast was causing panics when calling String() on dnsMsg with dnsRR_A answers. R=golang-dev, dave, rsc CC=golang-dev https://golang.org/cl/6818043 --- diff --git a/src/pkg/net/dnsmsg.go b/src/pkg/net/dnsmsg.go index b6ebe11736..161afb2a55 100644 --- a/src/pkg/net/dnsmsg.go +++ b/src/pkg/net/dnsmsg.go @@ -618,7 +618,7 @@ func printStruct(any dnsStruct) string { s += name + "=" switch tag { case "ipv4": - i := val.(uint32) + i := *val.(*uint32) s += IPv4(byte(i>>24), byte(i>>16), byte(i>>8), byte(i)).String() case "ipv6": i := val.([]byte)