projects
/
hashcat.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e3c499c
)
Fix a race condition in output file handling
author
jsteube
<jens.steube@gmail.com>
Tue, 21 Jun 2016 10:25:07 +0000
(12:25 +0200)
committer
jsteube
<jens.steube@gmail.com>
Tue, 21 Jun 2016 10:25:07 +0000
(12:25 +0200)
src/hashcat.c
patch
|
blob
|
history
diff --git
a/src/hashcat.c
b/src/hashcat.c
index
24f5c07
..
ae8b19e
100644
(file)
--- a/
src/hashcat.c
+++ b/
src/hashcat.c
@@
-2276,14
+2276,14
@@
static void check_cracked (hc_device_param_t *device_param, const uint salt_pos)
uint cpt_cracked = 0;
uint cpt_cracked = 0;
+ hc_thread_mutex_lock (mux_display);
+
for (uint i = 0; i < num_cracked; i++)
{
const uint hash_pos = cracked[i].hash_pos;
if (data.digests_shown[hash_pos] == 1) continue;
for (uint i = 0; i < num_cracked; i++)
{
const uint hash_pos = cracked[i].hash_pos;
if (data.digests_shown[hash_pos] == 1) continue;
- hc_thread_mutex_lock (mux_display);
-
if ((data.opts_type & OPTS_TYPE_PT_NEVERCRACK) == 0)
{
data.digests_shown[hash_pos] = 1;
if ((data.opts_type & OPTS_TYPE_PT_NEVERCRACK) == 0)
{
data.digests_shown[hash_pos] = 1;
@@
-2304,11
+2304,11
@@
static void check_cracked (hc_device_param_t *device_param, const uint salt_pos)
if (data.salts_done == data.salts_cnt) data.devices_status = STATUS_CRACKED;
if (data.salts_done == data.salts_cnt) data.devices_status = STATUS_CRACKED;
- hc_thread_mutex_unlock (mux_display);
-
check_hash (device_param, &cracked[i]);
}
check_hash (device_param, &cracked[i]);
}
+ hc_thread_mutex_unlock (mux_display);
+
myfree (cracked);
if (cpt_cracked > 0)
myfree (cracked);
if (cpt_cracked > 0)