aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--testcases.txt4
-rw-r--r--zxcvbn.c3
2 files changed, 5 insertions, 2 deletions
diff --git a/testcases.txt b/testcases.txt
index 8eaeac3..cddf519 100644
--- a/testcases.txt
+++ b/testcases.txt
@@ -59,4 +59,8 @@ pass.word.pass.word.pass.word. 60.41
passpasswordword 17.28
quvpzquvpz 24.50
+#-- with UK KBD (US-KBD=17.08)
+jkl;'# 11.12
+
magicfavoriteunclepromisedpublicbotherislandjimseriouslycellleadknowingbrokenadvicesomehowpaidblairlosingpushhelpedkillingusuallyearlierbosslaurabeginninglikedinnocentdocruleselizabethsabrinasummerexcoplearnedthirtyrisklettingphillipspeakingofficerridiculoussupportafternoonericwithsobutallwellareheohaboutrightyou're 545.9
+
diff --git a/zxcvbn.c b/zxcvbn.c
index af84b65..8afe64d 100644
--- a/zxcvbn.c
+++ b/zxcvbn.c
@@ -1148,9 +1148,9 @@ static void SpatialMatch(ZxcMatch_t **Result, const uint8_t *Passwd, int Start,
for(CurLen = MaxLen; CurLen >= MIN_SPATIAL_LEN;CurLen = Len - 1)
{
Len = 0;
- memset(&Extra, 0, sizeof Extra);
for(k = Keyboards, Indx = 0; Indx < (sizeof Keyboards / sizeof Keyboards[0]); ++Indx, ++k)
{
+ memset(&Extra, 0, sizeof Extra);
Len = DoSptlMatch(Passwd, CurLen, k, &Extra);
if (Len > 0)
{
@@ -1201,7 +1201,6 @@ static void SpatialMatch(ZxcMatch_t **Result, const uint8_t *Passwd, int Start,
p->Length = Len;
AddMatchRepeats(Result, p, Passwd, MaxLen);
AddResult(Result, p, MaxLen);
- break;
}
}
}