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

ensure there is no NULL char among random data #12

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

Conversation

Lex-2008
Copy link

@Lex-2008 Lex-2008 commented Jan 7, 2025

This random data is later used as part of input for ngx_crypt function, which expects a zero-terminated string. If the string contains a zero character, then rest of string is ignored, and the seed is effectively truncated. Good that the seed is at the end of the string. :) I believe it's better to exclude strings containing zero character from possible outputs of this function, rather than truncate everything after it.

This random data is later used as part of input for ngx_crypt function,
which expects a zero-terminated string. If the string contains a zero
character, then rest of string is ignored, and the seed is effectively
truncated. Good that the seed is at the end of the string. :) I believe
it's better to exclude strings containing zero character from possible
outputs of this function, rather than truncate everything after it.
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