added return code check whenever fstat () was called

pull/1066/head
philsmd 7 years ago
parent ce56f184c6
commit c1b89fb2ac
No known key found for this signature in database
GPG Key ID: 4F25D016D9D6A8AF

@ -69,6 +69,7 @@
- OpenCL Runtime: Updated AMDGPU-Pro driver version check, do warn if version 16.60 is detected which is known to be broken
- OpenCL Kernel: Renumbered hash-mode 7600 to 4521
- OpenCL Device: Do a check on available constant memory size and abort if it's less than 64kB
- File Reads: Improved error detection on file reads, especially when getting the file stats
- Sessions: Move out handling of multiple instance from restore file into separate pidfile
- Threads: Restored strerror as %m is unsupported by the BSDs
- Wordlists: Disable dictstat handling for hash-mode 3000 as it virtually creates words in the wordlist which is not the case for other modes

@ -141,7 +141,7 @@ static int outfile_remove (hashcat_ctx_t *hashcat_ctx)
hc_stat_t outfile_stat;
hc_fstat (fileno (fp), &outfile_stat);
if (hc_fstat (fileno (fp), &outfile_stat)) continue;
if (outfile_stat.st_ctime > out_info[j].ctime)
{

@ -1572,7 +1572,7 @@ int user_options_check_files (hashcat_ctx_t *hashcat_ctx)
if (tmp_outfile_fp)
{
hc_fstat (fileno (tmp_outfile_fp), &tmpstat_outfile);
if (hc_fstat (fileno (tmp_outfile_fp), &tmpstat_outfile)) return -1;
fclose (tmp_outfile_fp);
}
@ -1581,7 +1581,7 @@ int user_options_check_files (hashcat_ctx_t *hashcat_ctx)
if (tmp_hashfile_fp)
{
hc_fstat (fileno (tmp_hashfile_fp), &tmpstat_hashfile);
if (hc_fstat (fileno (tmp_hashfile_fp), &tmpstat_hashfile)) return -1;
fclose (tmp_hashfile_fp);
}

@ -285,7 +285,7 @@ u64 count_words (hashcat_ctx_t *hashcat_ctx, FILE *fd, const char *dictfile)
d.cnt = 0;
hc_fstat (fileno (fd), &d.stat);
if (hc_fstat (fileno (fd), &d.stat)) return 0;
d.stat.st_mode = 0;
d.stat.st_nlink = 0;

Loading…
Cancel
Save