Skip to content

Commit

Permalink
Fix possible deadlock
Browse files Browse the repository at this point in the history
  • Loading branch information
glv2 committed Jul 19, 2017
1 parent 9db66ee commit 0f40f2f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/bruteforce-luks.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,10 @@ int generate_next_password(unsigned char **pwd, unsigned int *pwd_len)
if(len == 0)
len = min_len - prefix_len - suffix_len;
if(len > max_len - prefix_len - suffix_len)
{
pthread_mutex_unlock(&get_password_lock);
return(0);
}

/* Initialize index table */
if(tab == NULL)
Expand Down

0 comments on commit 0f40f2f

Please sign in to comment.