restore: Make sure buffer is large enough

This commit is contained in:
Alexander Neumann 2017-02-15 15:19:28 +01:00
parent c83e608cce
commit 50d066befb
1 changed files with 1 additions and 1 deletions

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))
}