diff options
author | tsyrogit <tsyrogit@users.noreply.github.com> | 2017-03-04 14:58:52 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-04 14:58:52 +0000 |
commit | f552a523652fbc28e88111f2d4136783cf75afc5 (patch) | |
tree | 44d89c039927f347cdb134978e94a64d2724a121 | |
parent | 4d46debda8ea4484ac452b86c6a06ca6b830e102 (diff) | |
parent | ad2ef761986e500fc7e657413ae3e09f791d855e (diff) | |
download | zxcvbn-c-f552a523652fbc28e88111f2d4136783cf75afc5.tar.gz |
Merge pull request #11 from hannob/master
memory safety fixes (bugs discovered with address sanitizer)
-rw-r--r-- | dict-generate.cpp | 2 | ||||
-rw-r--r-- | zxcvbn.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/dict-generate.cpp b/dict-generate.cpp index 410182d..8dd48d4 100644 --- a/dict-generate.cpp +++ b/dict-generate.cpp @@ -1046,7 +1046,7 @@ static int OutputBinary(ostream *Out, const string & ChkFile, const string & Cha Out->write((char *)WordEnds, NumWordEnd); h(WordEnds, NumWordEnd); OutputSize += NumWordEnd; - delete WordEnds; + delete [] WordEnds; StringIntSet_t::iterator Its; string Str; @@ -493,7 +493,7 @@ typedef struct uint8_t LeetCnv[sizeof L33TCnv / LEET_NORM_MAP_SIZE + 1]; /* uint8_t LeetChr[3]; */ uint8_t First; - uint8_t PossChars[48]; + uint8_t PossChars[49]; } DictWork_t; /********************************************************************************** |