From 80676c685fe2b52ce0c48a7d9d922895d0c583b8 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Thu, 29 Jun 2017 22:05:23 +0200 Subject: contentenc: add safer "bPool" pool variant; add pBlockPool bPool verifies the lengths of slices going in and out. Also, add a plaintext block pool - pBlockPool - and use it for decryption. --- internal/fusefrontend/file.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/fusefrontend') diff --git a/internal/fusefrontend/file.go b/internal/fusefrontend/file.go index f70c9a5..277a71e 100644 --- a/internal/fusefrontend/file.go +++ b/internal/fusefrontend/file.go @@ -311,8 +311,8 @@ func (f *file) doWrite(data []byte, off int64) (uint32, fuse.Status) { } // Write _, err = f.fd.WriteAt(ciphertext, cOff) - // Return memory to cWritePool - f.fs.contentEnc.CWritePut(ciphertext) + // Return memory to CReqPool + f.fs.contentEnc.CReqPool.Put(ciphertext) if err != nil { tlog.Warn.Printf("doWrite: Write failed: %s", err.Error()) return 0, fuse.ToStatus(err) -- cgit v1.2.3