From 1c103e6179964631d9f21bde024fea861f637b8d Mon Sep 17 00:00:00 2001 From: dyhkwong <50692134+dyhkwong@users.noreply.github.com> Date: Fri, 15 Mar 2024 01:03:06 +0800 Subject: [PATCH] Fix ss2022 auth reader size overflow --- common/crypto/auth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/crypto/auth.go b/common/crypto/auth.go index 65bba5e26c3..f8ba55b8dce 100644 --- a/common/crypto/auth.go +++ b/common/crypto/auth.go @@ -178,7 +178,7 @@ func (r *AuthenticationReader) readInternal(soft bool, mb *buf.MultiBuffer) erro return errSoft } - if size <= buf.Size { + if effectiveSize <= buf.Size { b, err := r.readBuffer(effectiveSize, int32(padding)) if err != nil { return err