mirror of
https://github.com/hashcat/hashcat.git
synced 2024-12-23 07:08:19 +00:00
Avoid (possible) undefined behaviour in hc_fclose(), and don't assume plain file
This commit is contained in:
parent
9c7b9253e7
commit
6cf553410b
@ -596,7 +596,7 @@ void hc_fclose (HCFILE *fp)
|
||||
|
||||
unzClose (fp->ufp);
|
||||
}
|
||||
else
|
||||
else if (fp->pfp)
|
||||
{
|
||||
fclose (fp->pfp);
|
||||
}
|
||||
|
@ -211,8 +211,6 @@ void potfile_read_close (hashcat_ctx_t *hashcat_ctx)
|
||||
|
||||
if (hashconfig->potfile_disable == true) return;
|
||||
|
||||
if (potfile_ctx->fp.pfp == NULL) return;
|
||||
|
||||
hc_fclose (&potfile_ctx->fp);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user