diff --git a/src/interface.c b/src/interface.c index 3e2dd6a8c..799305f9d 100644 --- a/src/interface.c +++ b/src/interface.c @@ -5114,6 +5114,8 @@ int ikepsk_md5_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE char *saveptr; + if (input_buf == NULL) return (PARSER_HASH_VALUE); + in_off[0] = (u8 *) strtok_r ((char *) input_buf, ":", &saveptr); if (in_off[0] == NULL) return (PARSER_SEPARATOR_UNMATCHED); @@ -5200,6 +5202,8 @@ int ikepsk_sha1_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYB char *saveptr; + if (input_buf == NULL) return (PARSER_HASH_VALUE); + in_off[0] = (u8 *) strtok_r ((char *) input_buf, ":", &saveptr); if (in_off[0] == NULL) return (PARSER_SEPARATOR_UNMATCHED); @@ -22511,6 +22515,13 @@ int hashconfig_general_defaults (hashcat_ctx_t *hashcat_ctx) char *keyfile = strtok_r (keyfiles, ",", &saveptr); + if (keyfile == NULL) + { + free (keyfiles); + + return -1; + } + do { const int rc_crc32 = cpu_crc32 (hashcat_ctx, keyfile, (u8 *) keyfile_buf);