2
2
mirror of https://github.com/octoleo/restic.git synced 2024-06-29 13:53:29 +00:00

Merge pull request #808 from restic/fix-807

restore: Make sure buffer is large enough
This commit is contained in:
Alexander Neumann 2017-02-15 19:58:03 +01:00
commit 4772a4986b

View File

@ -215,7 +215,7 @@ func (node Node) createFileAt(path string, repo Repository, idx *HardlinkIndex)
}
buf = buf[:cap(buf)]
if uint(len(buf)) < size {
if len(buf) < CiphertextLength(int(size)) {
buf = NewBlobBuffer(int(size))
}