From: Theodore Ts'o Date: Thu, 11 Jun 2015 02:52:48 +0000 (-0400) Subject: e4crypt: fix hexidecimal salt parsing X-Git-Tag: v1.43-WIP-2016-03-15~96 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=58354a38e218baeb89fbaa4d9b27e2c948e08332;p=tools%2Fe2fsprogs.git e4crypt: fix hexidecimal salt parsing Signed-off-by: Theodore Ts'o --- diff --git a/misc/e4crypt.c b/misc/e4crypt.c index 05bd00b..c5b384a 100644 --- a/misc/e4crypt.c +++ b/misc/e4crypt.c @@ -302,7 +302,7 @@ static void parse_salt(char *salt_str, int flags) while (*cp) { if (salt_len >= EXT4_MAX_SALT_SIZE) goto invalid_salt; - h = memchr(hexchars, *cp++, sizeof(hexchars)); + h = memchr(hexchars, *cp++, hexchars_size); l = memchr(hexchars, *cp++, hexchars_size); if (!h || !l) goto invalid_salt;