From c4e6894d6af8c6b21598524be0ae89245621d334 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Mon, 30 Jul 2018 13:34:32 +0100 Subject: [PATCH] Copy sinfo.coords for safety --- src/yggdrasil/session.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/yggdrasil/session.go b/src/yggdrasil/session.go index ac1e3930..bc9d21f0 100644 --- a/src/yggdrasil/session.go +++ b/src/yggdrasil/session.go @@ -426,7 +426,8 @@ func (sinfo *sessionInfo) doSend(bs []byte) { // To prevent using empty session keys return } - coords := sinfo.coords + var coords []byte + coords = append(coords, sinfo.coords...) // Read IPv6 flowlabel field (20 bits). // Assumes packet at least contains IPv6 header. flowkey := uint64(bs[1]&0x0f)<<16 | uint64(bs[2])<<8 | uint64(bs[3])