From 58354a38e218baeb89fbaa4d9b27e2c948e08332 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Wed, 10 Jun 2015 22:52:48 -0400 Subject: [PATCH] e4crypt: fix hexidecimal salt parsing Signed-off-by: Theodore Ts'o --- misc/e4crypt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 1.8.3.1