From 6d46824fb0e150c2f90690c08e7de85612ba4e30 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Wed, 1 Nov 2017 09:58:59 +0100 Subject: [PATCH] Pass in a nil buffer to Open() --- internal/repository/key.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/repository/key.go b/internal/repository/key.go index e29e09257..781670bad 100644 --- a/internal/repository/key.go +++ b/internal/repository/key.go @@ -88,8 +88,7 @@ func OpenKey(ctx context.Context, s *Repository, name string, password string) ( // decrypt master keys nonce, ciphertext := k.Data[:k.user.NonceSize()], k.Data[k.user.NonceSize():] - buf := make([]byte, 0, len(ciphertext)) - buf, err = k.user.Open(buf, nonce, ciphertext, nil) + buf, err := k.user.Open(nil, nonce, ciphertext, nil) if err != nil { return nil, err }