SIGN IN SIGN UP
juanfont / headscale UNCLAIMED

An open source, self-hosted implementation of the Tailscale control server

0 0 43 Go

types/change: fix slice aliasing in Change.Merge

Merge copies the receiver by value, but the slice headers share the
backing array with the original. When append has spare capacity, it
writes through to the original's memory, and uniqueNodeIDs then
sorts that shared data in place.

Replace append with slices.Concat which always allocates a fresh
backing array, preventing mutation of the receiver's slices.
K
Kristoffer Dalby committed
2a2d5c869aeee6792209abc24874e57cd0e23e00
Parent: 157e3a3
Committed by Kristoffer Dalby <kristoffer@dalby.cc> on 4/10/2026, 12:18:56 PM