From 3a5f31d5a1efe1394ce311f40e5d9c8b58f28a4b Mon Sep 17 00:00:00 2001 From: gVisor bot Date: Wed, 12 Aug 2020 05:50:56 -0700 Subject: [PATCH] Fix: ssr broken (#895) --- component/ssr/protocol/auth_aes128_md5.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/component/ssr/protocol/auth_aes128_md5.go b/component/ssr/protocol/auth_aes128_md5.go index 0740f0b3..fc0c41bf 100644 --- a/component/ssr/protocol/auth_aes128_md5.go +++ b/component/ssr/protocol/auth_aes128_md5.go @@ -92,8 +92,8 @@ func (a *authAES128) Decode(b []byte) ([]byte, int, error) { break } - h = a.hmac(key, b[:bSize-4]) - if !bytes.Equal(h[:4], b[bSize-4:]) { + h = a.hmac(key, b[:length-4]) + if !bytes.Equal(h[:4], b[length-4:length]) { return nil, 0, errAuthAES128IncorrectChecksum }