1
mirror of https://github.com/hashcat/hashcat synced 2024-12-27 05:13:45 +01:00

Merge pull request #1088 from philsmd/master

minor: check return value of hc_stat () and use fclose () in case of error
This commit is contained in:
Jens Steube 2017-02-14 19:16:50 +01:00 committed by GitHub
commit a969cb0768

View File

@ -306,7 +306,12 @@ static int read_kernel_binary (hashcat_ctx_t *hashcat_ctx, const char *kernel_fi
{
hc_stat_t st;
hc_stat (kernel_file, &st);
if (hc_stat (kernel_file, &st))
{
fclose (fp);
return -1;
}
char *buf = (char *) hcmalloc (st.st_size + 1);