diff --git a/src/modules/module_31900.c b/src/modules/module_31900.c index 96c6840be..291c3d213 100644 --- a/src/modules/module_31900.c +++ b/src/modules/module_31900.c @@ -131,6 +131,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE hc_token_t token; + memset (&token, 0, sizeof (hc_token_t)); + token.token_cnt = 4; token.signatures_cnt = 1; @@ -141,21 +143,18 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE | TOKEN_ATTR_VERIFY_SIGNATURE; token.sep[1] = '$'; - token.len_min[1] = 24; - token.len_max[1] = 24; - token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH + token.len[1] = 24; + token.attr[1] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_BASE64A; token.sep[2] = '$'; - token.len_min[2] = 32; - token.len_max[2] = 32; - token.attr[2] = TOKEN_ATTR_VERIFY_LENGTH + token.len[2] = 32; + token.attr[2] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_HEX; token.sep[3] = '$'; - token.len_min[3] = 24; - token.len_max[3] = 24; - token.attr[3] = TOKEN_ATTR_VERIFY_LENGTH + token.len[3] = 24; + token.attr[3] = TOKEN_ATTR_FIXED_LENGTH | TOKEN_ATTR_VERIFY_BASE64A; const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token);