Skip to content

Commit

Permalink
Fix match for decrementing sequences
Browse files Browse the repository at this point in the history
This was causing heap corruptions (write past array boundary) in
ZxcvbnMatch for passwords ending with 09 for example
  • Loading branch information
dhenot committed May 10, 2017
1 parent e1eb658 commit bd4adda
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion zxcvbn.c
Original file line number Diff line number Diff line change
Expand Up @@ -1491,8 +1491,9 @@ static void SequenceMatch(ZxcMatch_t **Result, const uint8_t *Passwd, int Start,
{
++Len;
++Passwd;
break;
}
else if ((Next > SetHigh) || (Next < SetLow) || (Passwd[1] != Next))
if ((Next > SetHigh) || (Next < SetLow) || (Passwd[1] != Next))
break;
++Len;
++Passwd;
Expand Down

0 comments on commit bd4adda

Please sign in to comment.