diff options
author | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2018-02-11 23:07:07 +0100 |
---|---|---|
committer | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2018-02-11 23:07:07 +0100 |
commit | 04ded4c63183927feba565a43fafc987dba32005 (patch) | |
tree | ca363d094317cf96d05a2fbfbb179ab6d2385373 | |
parent | 8bdadaae5968d69f7db5e43981858d80ca3986d8 (diff) |
Added missing mutex acquisition
-rw-r--r-- | cookie.go | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -62,6 +62,9 @@ func (st *CookieChecker) Init(pk NoisePublicKey) { } func (st *CookieChecker) CheckMAC1(msg []byte) bool { + st.mutex.RLock() + defer st.mutex.RUnlock() + size := len(msg) smac2 := size - blake2s.Size128 smac1 := smac2 - blake2s.Size128 |