diff --git a/src/restic/pack/pack.go b/src/restic/pack/pack.go index be4fcc087..6666d886a 100644 --- a/src/restic/pack/pack.go +++ b/src/restic/pack/pack.go @@ -233,6 +233,8 @@ func List(k *crypto.Key, rd io.ReaderAt, size int64) (entries []restic.Blob, err hdrRd := bytes.NewReader(buf) + entries = make([]restic.Blob, 0, uint(n)/entrySize) + pos := uint(0) for { e := headerEntry{}