mirror of
https://github.com/hashcat/hashcat.git
synced 2025-03-24 11:25:41 +00:00
minor: check return value of hc_stat () and use fclose () in case of error
This commit is contained in:
parent
670ac4aa6e
commit
f87c65d081
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user