Remove tainted zeroing from packDomainName
With the label copying now moved after the compression, the msg buffer will no longer be tainted and need clearing.
This commit is contained in:
parent
8995ae83e3
commit
36a30d2e58
6
msg.go
6
msg.go
|
@ -307,12 +307,6 @@ loop:
|
|||
}
|
||||
// If we did compression and we find something add the pointer here
|
||||
if pointer != -1 {
|
||||
// Clear the msg buffer after the pointer location, otherwise
|
||||
// packDataNsec writes the wrong data to msg.
|
||||
tainted := msg[nameoffset:off]
|
||||
for i := range tainted {
|
||||
tainted[i] = 0
|
||||
}
|
||||
// We have two bytes (14 bits) to put the pointer in
|
||||
// if msg == nil, we will never do compression
|
||||
binary.BigEndian.PutUint16(msg[nameoffset:], uint16(pointer^0xC000))
|
||||
|
|
Loading…
Reference in New Issue