From 67a8584f7cad0aec5c53b58dd47dcd632ce44e05 Mon Sep 17 00:00:00 2001 From: philsmd Date: Tue, 14 Feb 2017 15:27:31 +0100 Subject: [PATCH] precompute_salt_md5: don't allow a salt_len > 64 --- src/interface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/interface.c b/src/interface.c index a9879c9a0..a7f03a37b 100644 --- a/src/interface.c +++ b/src/interface.c @@ -3298,7 +3298,7 @@ int md5s_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSE salt_len = parse_and_store_salt (salt_buf_ptr, salt_buf, salt_len, hashconfig); - if (salt_len == UINT_MAX) return (PARSER_SALT_LENGTH); + if (salt_len > 64) return (PARSER_SALT_LENGTH); salt->salt_len = salt_len; @@ -4117,7 +4117,7 @@ int ipb2_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSE salt_len = parse_and_store_salt (salt_buf_ptr, salt_buf, salt_len, hashconfig); - if (salt_len == UINT_MAX) return (PARSER_SALT_LENGTH); + if (salt_len > 64) return (PARSER_SALT_LENGTH); salt->salt_len = salt_len;