Skip to content

ensure there is no NULL char among random data#12

Open
Lex-2008 wants to merge 1 commit into
masonicboom:masterfrom
Lex-2008:no-null
Open

ensure there is no NULL char among random data#12
Lex-2008 wants to merge 1 commit into
masonicboom:masterfrom
Lex-2008:no-null

Conversation

@Lex-2008

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

Copy link
Copy Markdown

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