From caa2c5c56bc009f36a22828b4a5885602bc9675d Mon Sep 17 00:00:00 2001 From: Rasmus Dahlberg Date: Mon, 28 Mar 2022 18:59:43 +0200 Subject: fix so that test buffer is always correct size --- pkg/types/encoding_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/types/encoding_test.go b/pkg/types/encoding_test.go index a050002..cbcf3ba 100644 --- a/pkg/types/encoding_test.go +++ b/pkg/types/encoding_test.go @@ -15,7 +15,7 @@ func TestPutSSHString(t *testing.T) { in: "รถ foo is a bar", }, } { - var b [128]byte + b := make([]byte, 4+len(tbl.in)) i := putSSHString(b[:], tbl.in) if got, want := i, len(tbl.in)+4; got != want { -- cgit v1.2.3