• Ian Gudger's avatar
    dns/dnsmessage: fix bug in length fixup · 8887df42
    Ian Gudger authored
    If during packing, the byte slice gets re-allocated between packing the
    ResourceHeader and ResourceBody, the length will get updated in the old
    byte slice before re-allocation resulting in a zero length in the final
    packed message.
    
    This change fixes the bug by passing the offset at which the length
    should be written instead of a slice of the output byte slice from
    ResourceHeader encoding step.
    
    Updates golang/go#16218
    
    Change-Id: Ifd7e2f549b7087ed5b52eaa6ae78970fec4ad988
    Reviewed-on: https://go-review.googlesource.com/123835
    Run-TryBot: Ian Gudger <igudger@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    8887df42
Name
Last commit
Last update
bpf Loading commit data...
context Loading commit data...
dict Loading commit data...
dns/dnsmessage Loading commit data...
html Loading commit data...
http Loading commit data...
http2 Loading commit data...
icmp Loading commit data...
idna Loading commit data...
internal Loading commit data...
ipv4 Loading commit data...
ipv6 Loading commit data...
lif Loading commit data...
nettest Loading commit data...
netutil Loading commit data...
proxy Loading commit data...
publicsuffix Loading commit data...
route Loading commit data...
trace Loading commit data...
webdav Loading commit data...
websocket Loading commit data...
xsrftoken Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
codereview.cfg Loading commit data...