Commit 1eae1252 authored by Alexey Borzenkov's avatar Alexey Borzenkov Committed by Russ Cox

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
parent e0c9d04a
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment