From 5ad93f32da3e2ac70b1fa929889d3034c79f7ed6 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Thu, 3 Mar 2016 11:07:59 -0600 Subject: Fix bzcat integer overflow reported by John Regehr. --- tests/bzcat.test | 4 ++++ tests/files/bzcat/overflow.bz2 | Bin 0 -> 993 bytes 2 files changed, 4 insertions(+) create mode 100644 tests/files/bzcat/overflow.bz2 (limited to 'tests') diff --git a/tests/bzcat.test b/tests/bzcat.test index 4eacc684..ef1b07f5 100755 --- a/tests/bzcat.test +++ b/tests/bzcat.test @@ -6,6 +6,10 @@ [ -f testing.sh ] && . testing.sh #testing "name" "command" "result" "infile" "stdin" +testing "overflow" \ + 'bzcat "$TOPDIR/files/bzcat/overflow.bz2" >/dev/null 2>/dev/null; + [ $? -eq 1 ] && echo good' "good\n" "" "" + echo "hello" > file tar -cjf file.tar.bz2 file # Get system bzcat diff --git a/tests/files/bzcat/overflow.bz2 b/tests/files/bzcat/overflow.bz2 new file mode 100644 index 00000000..9ac7947b Binary files /dev/null and b/tests/files/bzcat/overflow.bz2 differ -- cgit v1.2.3