From 3e76f7af0f6d92a8ae8b077f775b97ead3aef7bf Mon Sep 17 00:00:00 2001 From: Hanno Date: Thu, 2 Mar 2017 11:58:18 +0100 Subject: [PATCH] Fix stack buffer overflow in zxcvbn. The array PossChars is filled with a 48 byte string plus a trailing zero byte. Therefore it needs to be 49 bytes long. --- src/zxcvbn/zxcvbn.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zxcvbn/zxcvbn.cpp b/src/zxcvbn/zxcvbn.cpp index 25cbe5440..c999adfae 100644 --- a/src/zxcvbn/zxcvbn.cpp +++ b/src/zxcvbn/zxcvbn.cpp @@ -496,7 +496,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; /**********************************************************************************