1
0
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:
Jukka Ojanen 2021-08-11 14:06:48 +03:00
parent 9c7b9253e7
commit 6cf553410b
2 changed files with 1 additions and 3 deletions

View File

@ -596,7 +596,7 @@ void hc_fclose (HCFILE *fp)
unzClose (fp->ufp);
}
else
else if (fp->pfp)
{
fclose (fp->pfp);
}

View File

@ -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);
}