mirror of
https://github.com/ckolivas/lrzip.git
synced 2025-12-06 07:12:00 +01:00
Add sanity check for meaningless chunk_byte value on runzip.
This commit is contained in:
parent
1ea75154d6
commit
103d2ce11e
2
runzip.c
2
runzip.c
|
|
@ -274,6 +274,8 @@ static i64 runzip_chunk(rzip_control *control, int fd_in, i64 expected_size, i64
|
|||
/* Read in the stored chunk byte width from the file */
|
||||
if (unlikely(read_1g(control, fd_in, &chunk_bytes, 1) != 1))
|
||||
fatal("Failed to read chunk_bytes size in runzip_chunk\n");
|
||||
if (unlikely(chunk_bytes < 1 || chunk_bytes > 8))
|
||||
failure("chunk_bytes %d is invalid in runzip_chunk\n", chunk_bytes);
|
||||
}
|
||||
if (!tally && expected_size)
|
||||
print_maxverbose("Expected size: %lld\n", expected_size);
|
||||
|
|
|
|||
Loading…
Reference in a new issue