Skip to content

readpass_file: reject lookahead I/O errors - #444

Open
tokenjunkielabs wants to merge 1 commit into
Tarsnap:masterfrom
woahwhattheheck:zz-solforge/readpass-file-read-error-upstream-20260920
Open

tokenjunkielabs wants to merge 1 commit into
Tarsnap:masterfrom
woahwhattheheck:zz-solforge/readpass-file-read-error-upstream-20260920

Conversation

@tokenjunkielabs

@tokenjunkielabs tokenjunkielabs commented Sep 21, 2026 •

Copy link
Copy Markdown

Make the one-byte lookahead distinguish clean EOF from an input error. fgetc() returns EOF for both cases; accepting it without checking ferror(f) can silently accept the already-buffered passphrase prefix when the lookahead itself failed.

Bounty attribution

The first report was emailed to Colin before source publication. Under this repository's AGENTS.md, any bounty is for the report rather than the patch. This pull request is not a separate bounty claim; it is the focused source carrier supporting the existing first-reporter submission.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants