Avoid CRC32 when decompressing older version archives.
This commit is contained in:
parent
817e16cce6
commit
bdf16c4cb9
1 changed files with 5 additions and 2 deletions
7
main.c
7
main.c
|
@ -350,7 +350,7 @@ redo:
|
||||||
sem_post(&tdat->cmp_done_sem);
|
sem_post(&tdat->cmp_done_sem);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else if (mac_bytes > 0) {
|
||||||
/*
|
/*
|
||||||
* Verify header CRC32 in non-crypto mode.
|
* Verify header CRC32 in non-crypto mode.
|
||||||
*/
|
*/
|
||||||
|
@ -652,6 +652,9 @@ start_decompress(const char *filename, const char *to_filename)
|
||||||
UNCOMP_BAIL;
|
UNCOMP_BAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (version < 5)
|
||||||
|
mac_bytes = 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If encryption is enabled initialize crypto.
|
* If encryption is enabled initialize crypto.
|
||||||
*/
|
*/
|
||||||
|
@ -785,7 +788,7 @@ start_decompress(const char *filename, const char *to_filename)
|
||||||
close(uncompfd); unlink(to_filename);
|
close(uncompfd); unlink(to_filename);
|
||||||
err_exit(0, "Header verification failed! File tampered or wrong password.\n");
|
err_exit(0, "Header verification failed! File tampered or wrong password.\n");
|
||||||
}
|
}
|
||||||
} else {
|
} else if (version >= 5) {
|
||||||
uint32_t crc1, crc2;
|
uint32_t crc1, crc2;
|
||||||
unsigned int hlen;
|
unsigned int hlen;
|
||||||
unsigned short d1;
|
unsigned short d1;
|
||||||
|
|
Loading…
Reference in a new issue