aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authortsyrogit <tsyrogit@users.noreply.github.com>2017-05-15 22:46:54 +0100
committerGitHub <noreply@github.com>2017-05-15 22:46:54 +0100
commit0f966503bc944ac693e48c615c7e0f5e8d35086c (patch)
tree361dbdcbe2e011d7fbd201def57b405de792dd18
parentafd7481dfc80bdcf09166d9831cfad8122313165 (diff)
parentbd4addab51dc36f23b83e4efe86c2dae74ed81ac (diff)
downloadzxcvbn-c-0f966503bc944ac693e48c615c7e0f5e8d35086c.tar.gz
Merge pull request #14 from dhenot/master
Fix match for decrementing sequences causing heap corruptions
-rw-r--r--zxcvbn.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/zxcvbn.c b/zxcvbn.c
index 0ed8560..7ab2eb2 100644
--- a/zxcvbn.c
+++ b/zxcvbn.c
@@ -1483,8 +1483,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;