projects
/
hashcat.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
057909f
)
Fix race condition in thread_keypress
author
jsteube
<jens.steube@gmail.com>
Sun, 26 Jun 2016 13:55:23 +0000
(15:55 +0200)
committer
jsteube
<jens.steube@gmail.com>
Sun, 26 Jun 2016 13:55:23 +0000
(15:55 +0200)
src/hashcat.c
patch
|
blob
|
history
diff --git
a/src/hashcat.c
b/src/hashcat.c
index
4baaa90
..
e57f4ba
100644
(file)
--- a/
src/hashcat.c
+++ b/
src/hashcat.c
@@
-18201,11
+18201,6
@@
int main (int argc, char **argv)
local_free (c_threads);
local_free (c_threads);
- if ((data.devices_status != STATUS_CRACKED) && (data.devices_status != STATUS_ABORTED) && (data.devices_status != STATUS_QUIT) && (data.devices_status != STATUS_BYPASS))
- {
- data.devices_status = STATUS_EXHAUSTED;
- }
-
logfile_sub_var_uint ("status-after-work", data.devices_status);
data.restore = 0;
logfile_sub_var_uint ("status-after-work", data.devices_status);
data.restore = 0;
@@
-18265,11
+18260,11
@@
int main (int argc, char **argv)
global_free (subid);
global_free (subid);
- // from this point we handle bypass as exhausted
+ // from this point we handle bypass as running
if (data.devices_status == STATUS_BYPASS)
{
if (data.devices_status == STATUS_BYPASS)
{
- data.devices_status = STATUS_EXHAUSTED;
+ data.devices_status = STATUS_RUNNING;
}
// finalize task
}
// finalize task
@@
-18337,6
+18332,11
@@
int main (int argc, char **argv)
// wait for non-interactive threads
// wait for non-interactive threads
+ if ((data.devices_status != STATUS_CRACKED) && (data.devices_status != STATUS_ABORTED) && (data.devices_status != STATUS_QUIT))
+ {
+ data.devices_status = STATUS_EXHAUSTED;
+ }
+
for (uint thread_idx = 0; thread_idx < ni_threads_cnt; thread_idx++)
{
hc_thread_wait (1, &ni_threads[thread_idx]);
for (uint thread_idx = 0; thread_idx < ni_threads_cnt; thread_idx++)
{
hc_thread_wait (1, &ni_threads[thread_idx]);