LM formats: Fix for 8-bit self-tests#5903
Merged
magnumripper merged 1 commit intoopenwall:bleeding-jumbofrom Nov 19, 2025
Merged
LM formats: Fix for 8-bit self-tests#5903magnumripper merged 1 commit intoopenwall:bleeding-jumbofrom
magnumripper merged 1 commit intoopenwall:bleeding-jumbofrom
Conversation
solardiz
approved these changes
Nov 19, 2025
Member
solardiz
left a comment
There was a problem hiding this comment.
Suggested minor changes, but approving overall
| fprintf_color(color_warning, stderr, | ||
| "Warning: LM formats incompatible with %s encoding, disabling some tests.\n", | ||
| cp_id2name(options.target_enc)); | ||
| tests[16].ciphertext = NULL; // Truncates the array after 16 entries |
Member
There was a problem hiding this comment.
I suggest we at least add a comment within the tests array initializer about index/element 16 being special. Also, let's not end messages with a dot except when it's multiple sentences/lines.
Member
Author
There was a problem hiding this comment.
I also added a test for sizeof(tests) / sizeof(tests[0]) > 16 before truncating. I often comment out many test vectors when debugging.
119c2ed to
52cccf8
Compare
The test vectors we ended up with in d7a4b6d are only compatible with DOS codepages. We now detect if running with non-DOS codepage or UTF8, and emit a warning. We then also truncate the array of self-tests so they don't fail. Closes openwall#5887
52cccf8 to
10dc320
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The test vectors we ended up with in d7a4b6d are only compatible with DOS codepages. We now detect if running with non-DOS codepage or UTF8, and emit a warning. We then also truncate the array of self-tests so they don't fail.
Closes #5887