summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/bunzip2.tests16
-rw-r--r--testsuite/bz2_issue_11.bz2bin0 -> 12000 bytes
-rw-r--r--testsuite/bz2_issue_12.bz2bin0 -> 11000 bytes
3 files changed, 16 insertions, 0 deletions
diff --git a/testsuite/bunzip2.tests b/testsuite/bunzip2.tests
index fcfce1a..edb3327 100755
--- a/testsuite/bunzip2.tests
+++ b/testsuite/bunzip2.tests
@@ -552,6 +552,22 @@ if test "${0##*/}" = "bunzip2.tests"; then
echo "FAIL: $unpack: pbzip_4m_zeros file"
FAILCOUNT=$((FAILCOUNT + 1))
fi
+
+ errout="`${bb}bunzip2 <bz2_issue_11.bz2 2>&1 >/dev/null`"
+ if test x"$errout:$?" = x"bunzip2: bunzip error -5:1"; then
+ echo "PASS: $unpack: bz2_issue_11.bz2 corrupted example"
+ else
+ echo "FAIL: $unpack: bz2_issue_11.bz2 corrupted example"
+ FAILCOUNT=$((FAILCOUNT + 1))
+ fi
+
+ errout="`${bb}bunzip2 <bz2_issue_12.bz2 2>&1 >/dev/null`"
+ if test x"$errout:$?" = x"bunzip2: bunzip error -3:1"; then
+ echo "PASS: $unpack: bz2_issue_12.bz2 corrupted example"
+ else
+ echo "FAIL: $unpack: bz2_issue_12.bz2 corrupted example"
+ FAILCOUNT=$((FAILCOUNT + 1))
+ fi
fi
exit $((FAILCOUNT <= 255 ? FAILCOUNT : 255))
diff --git a/testsuite/bz2_issue_11.bz2 b/testsuite/bz2_issue_11.bz2
new file mode 100644
index 0000000..62b2520
--- /dev/null
+++ b/testsuite/bz2_issue_11.bz2
Binary files differ
diff --git a/testsuite/bz2_issue_12.bz2 b/testsuite/bz2_issue_12.bz2
new file mode 100644
index 0000000..4215f08
--- /dev/null
+++ b/testsuite/bz2_issue_12.bz2
Binary files differ