FAQ
Reviewers: golang-dev_googlegroups.com,

Message:
Hello golang-dev@googlegroups.com,

I'd like you to review this change to
https://code.google.com/p/go/


Description:
net: fix a tiny typo in dnsmsg.go

Incorrect cast was causing panics when
calling String() on dnsMsg with dnsRR_A
anwers.

Please review this at http://codereview.appspot.com/6818043/

Affected files:
M src/pkg/net/dnsmsg.go


Index: src/pkg/net/dnsmsg.go
===================================================================
--- a/src/pkg/net/dnsmsg.go
+++ b/src/pkg/net/dnsmsg.go
@@ -618,7 +618,7 @@
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)

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedOct 28, '12 at 10:36a
activeOct 28, '12 at 10:36a
posts1
users1
websitegolang.org

1 user in discussion

Snaury: 1 post

People

Translate

site design / logo © 2022 Grokbase