mirror of
https://github.com/ckolivas/lrzip.git
synced 2025-12-06 07:12:00 +01:00
Fix zero sized archive decompression.
This commit is contained in:
parent
95688b0833
commit
257186a865
8
runzip.c
8
runzip.c
|
|
@ -382,9 +382,11 @@ i64 runzip_fd(rzip_control *control, int fd_in, int fd_out, int fd_hist, i64 exp
|
|||
|
||||
do {
|
||||
u = runzip_chunk(control, fd_in, expected_size, total);
|
||||
if (unlikely(u < 1)) {
|
||||
print_err("Failed to runzip_chunk in runzip_fd\n");
|
||||
return -1;
|
||||
if (u < 1) {
|
||||
if (u < 0 || total < expected_size) {
|
||||
print_err("Failed to runzip_chunk in runzip_fd\n");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
total += u;
|
||||
if (TMP_OUTBUF) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue