Forgot to include salt length for next head.

This commit is contained in:
Con Kolivas 2011-03-20 17:01:33 +11:00
parent 30b70dc884
commit f87528d14d
2 changed files with 5 additions and 2 deletions

View file

@ -655,7 +655,10 @@ void decompress_file(rzip_control *control)
print_output("Output filename is: %s: ", control->outfile);
if (!expected_size)
expected_size = control->st_size;
if (!ENCRYPT)
print_progress("[OK] - %lld bytes \n", expected_size);
else
print_progress("[OK] \n");
if (unlikely(close(fd_hist) || close(fd_out)))
fatal("Failed to close files\n");

View file

@ -1335,7 +1335,7 @@ retry:
if (ENCRYPT)
rewrite_encrypted(control, ctis, ctis->s[cti->streamno].last_head - 17);
ctis->s[cti->streamno].last_head = ctis->cur_pos + 1 + (write_len * 2);
ctis->s[cti->streamno].last_head = ctis->cur_pos + 1 + (write_len * 2) + (ENCRYPT ? SALT_LEN : 0);
if (unlikely(seekto(control, ctis, ctis->cur_pos)))
fatal("Failed to seekto cur_pos in compthread %d\n", i);