diff --git a/main.c b/main.c index 1c46520..8c9d2b4 100644 --- a/main.c +++ b/main.c @@ -350,6 +350,9 @@ static void decompress_file(void) failure("Inadequate free space to decompress file, use -f to override.\n"); } + if (unlikely(posix_fallocate(fd_out, 0, expected_size))) + failure("Failed to fallocate fd_out in decompress_file\n"); + fd_hist = open(control.outfile, O_RDONLY); if (unlikely(fd_hist == -1)) fatal("Failed to open history file %s\n", control.outfile);