Avoid (possible) undefined behaviour in hc_fclose(), and don't assume plain file

pull/2926/head
Jukka Ojanen 3 years ago
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…
Cancel
Save