diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2015-10-26 19:33:05 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2015-10-26 19:33:05 +0100 |
commit | 1de25a6e87e0e627aa34298105a3d17c60a1f44e (patch) | |
tree | 9ddba32a47aeef1d5836a7e7229d48463b1a16ca /testsuite | |
parent | d683c5c2f1493c2b0856a5f8751508836b0988d5 (diff) | |
download | busybox-w32-1de25a6e87e0e627aa34298105a3d17c60a1f44e.tar.gz busybox-w32-1de25a6e87e0e627aa34298105a3d17c60a1f44e.tar.bz2 busybox-w32-1de25a6e87e0e627aa34298105a3d17c60a1f44e.zip |
unzip: test for bad archive SEGVing
function old new delta
huft_build 1296 1300 +4
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite')
-rwxr-xr-x | testsuite/unzip.tests | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/testsuite/unzip.tests b/testsuite/unzip.tests index 8677a0306..ca0a45800 100755 --- a/testsuite/unzip.tests +++ b/testsuite/unzip.tests | |||
@@ -7,7 +7,7 @@ | |||
7 | 7 | ||
8 | . ./testing.sh | 8 | . ./testing.sh |
9 | 9 | ||
10 | # testing "test name" "options" "expected result" "file input" "stdin" | 10 | # testing "test name" "commands" "expected result" "file input" "stdin" |
11 | # file input will be file called "input" | 11 | # file input will be file called "input" |
12 | # test can create a file "actual" instead of writing to stdout | 12 | # test can create a file "actual" instead of writing to stdout |
13 | 13 | ||
@@ -30,6 +30,27 @@ testing "unzip (subdir only)" "unzip -q foo.zip foo/ && test -d foo && test ! -f | |||
30 | rmdir foo | 30 | rmdir foo |
31 | rm foo.zip | 31 | rm foo.zip |
32 | 32 | ||
33 | # File containing some damaged encrypted stream | ||
34 | testing "unzip (bad archive)" "uudecode; unzip bad.zip 2>&1; echo \$?" \ | ||
35 | "Archive: bad.zip | ||
36 | inflating: ]3j½r«IK-%Ix | ||
37 | unzip: inflate error | ||
38 | 1 | ||
39 | " \ | ||
40 | "" "\ | ||
41 | begin-base64 644 bad.zip | ||
42 | UEsDBBQAAgkIAAAAIQA5AAAANwAAADwAAAAQAAcAXTNqwr1ywqtJGxJLLSVJ | ||
43 | eCkBD0AdKBk8JzQsIj01JC0/ORJQSwMEFAECCAAAAAAhADoAAAAPAAAANgAA | ||
44 | AAwAAQASw73Ct1DCokohPXQiNjoUNTUiHRwgLT4WHlBLAQIQABQAAggIAAAA | ||
45 | oQA5AAAANwAAADwAAAAQQAcADAAAACwAMgCAAAAAAABdM2rCvXLCq0kbEkst | ||
46 | JUl4KQEPQB0oGSY4Cz4QNgEnJSYIPVBLAQIAABQAAggAAAAAIQAqAAAADwAA | ||
47 | BDYAAAAMAAEADQAAADIADQAAAEEAAAASw73Ct1DKokohPXQiNzA+FAI1HCcW | ||
48 | NzITNFBLBQUKAC4JAA04Cw0EOhZQSwUGAQAABAIAAgCZAAAAeQAAAAIALhM= | ||
49 | ==== | ||
50 | " | ||
51 | |||
52 | rm * | ||
53 | |||
33 | # Clean up scratch directory. | 54 | # Clean up scratch directory. |
34 | 55 | ||
35 | cd .. | 56 | cd .. |