From 2d7de01c3d93285224e3c65f55845a316da8f4d0 Mon Sep 17 00:00:00 2001 From: cui fliter Date: Tue, 4 Oct 2022 22:45:04 +0800 Subject: [PATCH] secure/precis: replace bytes.Compare with bytes.Equal Signed-off-by: cui fliter --- secure/precis/profile.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/secure/precis/profile.go b/secure/precis/profile.go index 35bd6f0a5..bdd991bb9 100644 --- a/secure/precis/profile.go +++ b/secure/precis/profile.go @@ -316,7 +316,7 @@ func (p *Profile) Compare(a, b string) bool { return false } - return bytes.Compare(akey, bkey) == 0 + return bytes.Equal(akey, bkey) } // Allowed returns a runes.Set containing every rune that is a member of the