From 680e493065fad5a1ee84709f9aa367306d4439cf Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Mon, 3 Feb 2020 08:42:32 +0530 Subject: [PATCH] fix a crash in base64 buffer pool (#8925) looks like 1024 buffer size is not enough in all situations, use 8192 instead which can satisfy all the rare situations that may arise in base64 decoding. --- cmd/jwt/parser.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/jwt/parser.go b/cmd/jwt/parser.go index a62b9c781..85497deef 100644 --- a/cmd/jwt/parser.go +++ b/cmd/jwt/parser.go @@ -57,7 +57,7 @@ var ( func init() { base64BufPool = sync.Pool{ New: func() interface{} { - buf := make([]byte, 1024) + buf := make([]byte, 8192) return &buf }, }