busybox/testsuite/unlzma.tests
Denys Vlasenko a1870f4807 unlzma: fix segfault on bad archive
function                                             old     new   delta
unpack_lzma_stream                                  2647    2653      +6

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-04-08 20:45:16 +02:00

22 lines
482 B
Bash
Executable File

#!/bin/sh
. ./testing.sh
# testing "test name" "commands" "expected result" "file input" "stdin"
# file input will be file called "input"
# test can create a file "actual" instead of writing to stdout
# Damaged encrypted streams
testing "unlzma (bad archive 1)" \
"unlzma <unlzma_issue_1.lzma >/dev/null; echo \$?" \
"1
" "" ""
# Damaged encrypted streams
testing "unlzma (bad archive 2)" \
"unlzma <unlzma_issue_2.lzma >/dev/null; echo \$?" \
"1
" "" ""
exit $FAILCOUNT