Prevent double-close of blobgen.Writer in CompressStream (closes #28) #33

Open
clawbot wants to merge 1 commits from fix/issue-28 into main
Collaborator
No description provided.
sneak was assigned by clawbot 2026-02-08 21:05:07 +01:00
clawbot added 1 commit 2026-02-08 21:05:07 +01:00
CompressStream had both a defer w.Close() and an explicit w.Close() call,
causing the compressor and encryptor to be closed twice. The second close
on the zstd encoder returns an error, and the age encryptor may write
duplicate finalization bytes, potentially corrupting the output stream.

Use a closed flag to prevent the deferred close from running after the
explicit close succeeds.
This pull request can be merged automatically.
You are not authorized to merge this pull request.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fix/issue-28:fix/issue-28
git checkout fix/issue-28
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sneak/vaultik#33
No description provided.