forked from TrueCloudLab/restic
Merge pull request #808 from restic/fix-807
restore: Make sure buffer is large enough
This commit is contained in:
commit
4772a4986b
1 changed files with 1 additions and 1 deletions
|
@ -215,7 +215,7 @@ func (node Node) createFileAt(path string, repo Repository, idx *HardlinkIndex)
|
||||||
}
|
}
|
||||||
|
|
||||||
buf = buf[:cap(buf)]
|
buf = buf[:cap(buf)]
|
||||||
if uint(len(buf)) < size {
|
if len(buf) < CiphertextLength(int(size)) {
|
||||||
buf = NewBlobBuffer(int(size))
|
buf = NewBlobBuffer(int(size))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue