aboutsummaryrefslogtreecommitdiffhomepage
path: root/zxcvbn.c
diff options
context:
space:
mode:
authortony <tsyrogit@users.noreply.github.com>2017-03-04 16:49:38 +0000
committertony <tsyrogit@users.noreply.github.com>2017-03-04 16:49:38 +0000
commite1eb658db2f04b9235a10d210a1ed551511bff78 (patch)
tree51333182e16c5d3ed4770e36f04acf8dc31d9f01 /zxcvbn.c
parentf552a523652fbc28e88111f2d4136783cf75afc5 (diff)
downloadzxcvbn-c-e1eb658db2f04b9235a10d210a1ed551511bff78.tar.gz
Calculate the required size for PossChars based on the dictionary used. The fix
for this by hannob in commit ad2ef761 works for the current dictionary, but would fail if a dictionary is used with 49 or more possible characters for one of its nodes.
Diffstat (limited to 'zxcvbn.c')
-rw-r--r--zxcvbn.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/zxcvbn.c b/zxcvbn.c
index 2e15680..7468586 100644
--- a/zxcvbn.c
+++ b/zxcvbn.c
@@ -491,9 +491,8 @@ typedef struct
uint8_t Leeted[sizeof L33TChr];
uint8_t UnLeet[sizeof L33TChr];
uint8_t LeetCnv[sizeof L33TCnv / LEET_NORM_MAP_SIZE + 1];
- /* uint8_t LeetChr[3]; */
uint8_t First;
- uint8_t PossChars[49];
+ uint8_t PossChars[CHARSET_SIZE];
} DictWork_t;
/**********************************************************************************