Skip to content

Commit

Permalink
Check for invalid expected sizes and abort.
Browse files Browse the repository at this point in the history
  • Loading branch information
ckolivas committed May 25, 2018
1 parent ed51e14 commit 907b66b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lrzip.c
Original file line number Diff line number Diff line change
Expand Up @@ -803,6 +803,8 @@ bool decompress_file(rzip_control *control)
if (!STDIN) {
if (unlikely(!read_magic(control, fd_in, &expected_size)))
return false;
if (unlikely(expected_size < 0))
fatal_return(("Invalid expected size %lld\n", expected_size), false);
}

if (!STDOUT && !TEST_ONLY) {
Expand Down

0 comments on commit 907b66b

Please sign in to comment.