From 9efc4299283fc251db0a886fefc699dc44acdfe2 Mon Sep 17 00:00:00 2001 From: philsmd Date: Tue, 14 Feb 2017 18:49:35 +0100 Subject: [PATCH] dead code: in office parse functions --- src/interface.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/interface.c b/src/interface.c index fadf88554..a97a3e208 100644 --- a/src/interface.c +++ b/src/interface.c @@ -8670,9 +8670,9 @@ int oldoffice01_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYB encryptedVerifierHash_pos++; - u32 encryptedVerifierHash_len = input_len - 11 - version_len - 1 - osalt_len - 1 - encryptedVerifier_len - 1; - - if (encryptedVerifierHash_len != 32) return (PARSER_SALT_LENGTH); + // The following check is implied (and therefore not needed aka dead code): + // u32 encryptedVerifierHash_len = input_len - 11 - version_len - 1 - osalt_len - 1 - encryptedVerifier_len - 1; + // if (encryptedVerifierHash_len != 32) return (PARSER_SALT_LENGTH); const u32 version = *version_pos - 0x30; @@ -8927,9 +8927,9 @@ int oldoffice34_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYB encryptedVerifierHash_pos++; - u32 encryptedVerifierHash_len = input_len - 11 - version_len - 1 - osalt_len - 1 - encryptedVerifier_len - 1; - - if (encryptedVerifierHash_len != 40) return (PARSER_SALT_LENGTH); + // The following check is implied (and therefore not needed aka dead code): + // u32 encryptedVerifierHash_len = input_len - 11 - version_len - 1 - osalt_len - 1 - encryptedVerifier_len - 1; + // if (encryptedVerifierHash_len != 40) return (PARSER_SALT_LENGTH); const u32 version = *version_pos - 0x30;