[GH-ISSUE #1983] mask.c : stretch_mask adds too many characters #1327

Closed
opened 2026-10-14 03:44:26 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @crioux on GitHub (Jan 9, 2016).
Original GitHub issue: https://github.com/openwall/john/issues/1983

Originally assigned to: @magnumripper on GitHub.

If you set (for example)
--mask=?a --max-length=5
the output of stretch_mask is ?a?a?a?a?a?a , which is one character too long, because it is appending 'options.req_maxlength' characters to the end of the mask regardless of the the length of the input mask.

Don't know if this screws anything up later in the program but it doesn't seem right either.

Originally created by @crioux on GitHub (Jan 9, 2016). Original GitHub issue: https://github.com/openwall/john/issues/1983 Originally assigned to: @magnumripper on GitHub. If you set (for example) --mask=?a --max-length=5 the output of stretch_mask is ?a?a?a?a?a?a , which is one character too long, because it is appending 'options.req_maxlength' characters to the end of the mask regardless of the the length of the input mask. Don't know if this screws anything up later in the program but it doesn't seem right either.
bsakaguchi 2026-10-14 03:44:26 +07:00
Author
Owner

@magnumripper commented on GitHub (Jan 9, 2016):

This might actually worsen the problem where GPU-side mask picks stuff that later get truncated. I'll have a look at it.

<!-- gh-comment-id:170240159 --> @magnumripper commented on GitHub (Jan 9, 2016): This might actually worsen the problem where GPU-side mask picks stuff that later get truncated. I'll have a look at it.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
openwall/john#1327
No description provided.