aboutsummaryrefslogtreecommitdiff
path: root/internal/contentenc
diff options
context:
space:
mode:
Diffstat (limited to 'internal/contentenc')
-rw-r--r--internal/contentenc/bpool.go1
-rw-r--r--internal/contentenc/content.go2
2 files changed, 2 insertions, 1 deletions
diff --git a/internal/contentenc/bpool.go b/internal/contentenc/bpool.go
index c4517d3..c62170d 100644
--- a/internal/contentenc/bpool.go
+++ b/internal/contentenc/bpool.go
@@ -26,6 +26,7 @@ func (b *bPool) Put(s []byte) {
if len(s) != b.sliceLen {
log.Panicf("wrong len=%d, want=%d", len(s), b.sliceLen)
}
+ //lint:ignore SA6002 We intentionally pass slice by value to avoid allocation overhead in this specific use case
b.Pool.Put(s)
}
diff --git a/internal/contentenc/content.go b/internal/contentenc/content.go
index 3005bf5..5bf0b3c 100644
--- a/internal/contentenc/content.go
+++ b/internal/contentenc/content.go
@@ -151,7 +151,7 @@ func (be *ContentEnc) DecryptBlock(ciphertext []byte, blockNo uint64, fileID []b
if len(ciphertext) < be.cryptoCore.IVLen {
tlog.Warn.Printf("DecryptBlock: Block is too short: %d bytes", len(ciphertext))
- return nil, errors.New("Block is too short")
+ return nil, errors.New("block is too short")
}
// Extract nonce