Skip to content

scryptenc_print_error.c: add a "default" for safety#391

Merged
cperciva merged 1 commit intomasterfrom
print-error-default
Jan 11, 2025
Merged

scryptenc_print_error.c: add a "default" for safety#391
cperciva merged 1 commit intomasterfrom
print-error-default

Conversation

@gperciva
Copy link
Member

No description provided.

@gperciva
Copy link
Member Author

We should never need this, but there's no harm in adding it.

@gperciva
Copy link
Member Author

FWIW, this was inspired by tarsnap's lib/keyfile/keyfile.c, which includes a default: whenever checking the results of scrypt{enc,dec}_buf().

https://github.com/Tarsnap/tarsnap/blob/master/lib/keyfile/keyfile.c#L199

@gperciva gperciva force-pushed the print-error-default branch 2 times, most recently from f493593 to 35fd6b0 Compare December 23, 2024 03:11
We should never reach that "default", but that doesn't mean that it'll
never happen.
@cperciva cperciva merged commit ff5bd47 into master Jan 11, 2025
@gperciva gperciva deleted the print-error-default branch January 11, 2025 23:52
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