Explorar o código

Fix ss2022 auth reader size overflow

dyhkwong hai 1 ano
pai
achega
1c103e6179
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      common/crypto/auth.go

+ 1 - 1
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