Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crypto_secretbox return value #38

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

christianbundy
Copy link
Contributor

Problem: This doesn't cause a bug, when crypto_secretbox returns an
integer (0) then the check on line 97 always fails because it checks
whether the return value triple-equals false.

Solution: Change crypto_secretbox so that it returns booleans rather
than integers, which gives us the ability to make the check on line 97
fail (if we ever return anything other than true).

Problem: This doesn't cause a bug, when crypto_secretbox returns an
integer (`0`) then the check on line 97 always fails because it checks
whether the return value triple-equals `false`.

Solution: Change crypto_secretbox so that it returns booleans rather
than integers, which gives us the ability to make the check on line 97
fail (if we ever return anything other than `true`).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant