1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-12-23 15:18:16 +00:00

keyfiles: for VeraCrypt/TrueCrypt keyfiles we need to free the memory in case of errors

This commit is contained in:
philsmd 2017-02-14 17:32:39 +01:00
parent f4cf4b8e65
commit 6915bfad8b
No known key found for this signature in database
GPG Key ID: 4F25D016D9D6A8AF
2 changed files with 7 additions and 1 deletions

View File

@ -84,6 +84,7 @@
- File Locking: Improved error detection on file locks - File Locking: Improved error detection on file locks
- Hash Parsing: Added additional bound checks for the SIP digest authentication (MD5) parser (-m 11400) - Hash Parsing: Added additional bound checks for the SIP digest authentication (MD5) parser (-m 11400)
- Hash Parsing: Make sure that all files are correctly closed whenever a hash file parsing error occurs - Hash Parsing: Make sure that all files are correctly closed whenever a hash file parsing error occurs
- Keyfile handling: Make sure that the memory is cleanly freed whenever a VeraCrypt/TrueCrypt keyfile fails to load
- Sessions: Move out handling of multiple instance from restore file into separate pidfile - Sessions: Move out handling of multiple instance from restore file into separate pidfile
- Threads: Restored strerror as %m is unsupported by the BSDs - Threads: Restored strerror as %m is unsupported by the BSDs
- Wordlists: Fixed memory leak in case access a file in a wordlist folder fails - Wordlists: Fixed memory leak in case access a file in a wordlist folder fails

View File

@ -22506,7 +22506,12 @@ int hashconfig_general_defaults (hashcat_ctx_t *hashcat_ctx)
{ {
const int rc_crc32 = cpu_crc32 (hashcat_ctx, keyfile, (u8 *) keyfile_buf); const int rc_crc32 = cpu_crc32 (hashcat_ctx, keyfile, (u8 *) keyfile_buf);
if (rc_crc32 == -1) return -1; if (rc_crc32 == -1)
{
free (keyfiles);
return -1;
}
} while ((keyfile = strtok_r (NULL, ",", &saveptr)) != NULL); } while ((keyfile = strtok_r (NULL, ",", &saveptr)) != NULL);