mirror of
https://github.com/ckolivas/lrzip.git
synced 2026-04-21 06:03:54 +00:00
Add a control lock mutex for protecting certain control variables.
This commit is contained in:
parent
37ef39e70a
commit
4db4641dae
2 changed files with 3 additions and 0 deletions
|
|
@ -373,6 +373,8 @@ struct rzip_control {
|
|||
uchar *salt_pass;
|
||||
int salt_pass_len;
|
||||
uchar *hash;
|
||||
|
||||
pthread_mutex_t control_lock;
|
||||
unsigned char eof;
|
||||
unsigned char magic_written;
|
||||
|
||||
|
|
|
|||
1
rzip.c
1
rzip.c
|
|
@ -918,6 +918,7 @@ bool rzip_fd(rzip_control *control, int fd_in, int fd_out)
|
|||
double chunkmbs;
|
||||
i64 free_space;
|
||||
|
||||
init_mutex(control, &control->control_lock);
|
||||
if (!NO_MD5)
|
||||
md5_init_ctx(&control->ctx);
|
||||
init_mutex(control, &control->cksumlock);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue