CWE-584 Return Inside Finally
This test takes the name of a file as input. It then attempts
to get the absolute path of the file and open it for reading.
Since GetAbsolutePath.getAbsolutePath has a return in a finally
clause, any generated warnings are dropped, eventually leading to
a null pointer exception.
org.apache.poi.hwpf.converter.WordToHtmlConverter:org.apache.poi.hslf.extractor.QuickButCruddyTextExtractor:org.apache.poi.hpbf.extractor.PublisherTextExtractor:org.apache.poi.hwpf.extractor.WordExtractor:org.apache.poi.hssf.converter.ExcelToHtmlConverter:org.apache.poi.hpsf.examples.ReadTitle:org.apache.poi.hssf.extractor.ExcelExtractorPassworded:org.apache.poi.hdgf.extractor.VisioTextExtractor:org.apache.poi.hssf.extractor.ExcelExtractor:org.apache.poi.ss.examples.ToCSV
$SS_TC_DEPS/java/poi/*:$SS_TC_ROOT/$SS_TC_INSTALL:$SS_TC_DEPS/java/stonesoup/lttng/lttng-stonesoup-0.1.jar
UNSPECIFIED
UNSPECIFIED
java $SS_JAVA_OPTS -Djava.library.path=$SS_TC_DEPS/lib64/ -cp "$SS_JAVA_CLASSPATH"
env ANT_HOME=$SS_TC_DEPS/ant ant $SS_ANT_OPTS -Dstonesoup.database.postgres.required=no -Dstonesoup.hibernate.postgres.required=no -Dstonesoup.hibernate.mysql.required=no -Dstonesoup.database.mysql.required=no -Dstonesoup.socket.required=no -lib $SS_TC_DEPS/java/stonesoup/lttng/lttng-stonesoup-0.1.jar -Dmaven.repo.local="$SS_TC_DEPS/java/poi" -Dstonesoup.socket.lib.dir="$SS_TC_DEPS/java/stonesoup/socket" -Dstonesoup.hibernate.mysql.lib.dir="$SS_TC_DEPS/java/stonesoup/hibernate/mysql" -Dstonesoup.hibernate.postgres.lib.dir="$SS_TC_DEPS/java/stonesoup/hibernate/postgres" -Dstonesoup.database.mysql.lib.dir="$SS_TC_DEPS/java/stonesoup/database/mysql" -Dstonesoup.database.postgres.lib.dir="$SS_TC_DEPS/java/stonesoup/database/postgres" -Dmain.output.dir=$SS_TC_ROOT/$SS_TC_INSTALL -Dscratchpad.output.dir=$SS_TC_ROOT/$SS_TC_INSTALL -Dooxml.output.dir=$SS_TC_ROOT/$SS_TC_INSTALL -Dexcelant.output.dir=$SS_TC_ROOT/$SS_TC_INSTALL -Ddisconnected=true -Dmain.lib="$SS_TC_DEPS/java/poi/" -Dooxml.lib="$SS_TC_DEPS/java/poi" -DDSTAMP=CURRENT -Dstonesoup.lttng.lib.dir="$SS_TC_DEPS/java/stonesoup/lttng" -Dstonesoup.lttng.dummy.lib.dir="$SS_TC_DEPS/java/stonesoup/lttng-dummy" jar
cp -r $SS_TC_ROOT/src/build/examples-classes/org/apache/poi/* $SS_TC_ROOT/$SS_TC_INSTALL/org/apache/poi
convert a .doc to HTML
Environment variables
NONE
$SS_TC_ROOT/testData/milch_hypoderma.bin
i_exist_yo.txt
This is some text, it is in the file.
$SS_TC_ROOT/logs/execute/lttng
$SS_TC_DEPS/lib64/liblttng-stonesoup-java.so:$SS_TC_DEPS/lib64/liblttng-ust-fork.so
org.apache.poi.hwpf.converter.WordToHtmlConverter $SS_TC_ROOT/testData/good-01/ss-word.doc $SS_TC_ROOT/testData/good-01/ss-word.html
GOOD-01-FILE
good-01/ss-word.html
good-01/ss-word.html
extract a PPT file
Environment variables
NONE
$SS_TC_ROOT/testData/milch_hypoderma.bin
aFile.txt
One Fish, Two Fish, Red fish, Blue Fish.
$SS_TC_ROOT/logs/execute/lttng
$SS_TC_DEPS/lib64/liblttng-stonesoup-java.so:$SS_TC_DEPS/lib64/liblttng-ust-fork.so
org.apache.poi.hslf.extractor.QuickButCruddyTextExtractor $SS_TC_ROOT/testData/good-02/examplePPT.ppt
GOOD-02-STDOUT
good-02/output.txt
extract a .pub (Publisher) file
Environment variables
NONE
$SS_TC_ROOT/testData/milch_hypoderma.bin
asdfasdfasdf.txt
asdfasdfasdf
asdfasdfasdf
asdfasdfasdf
$SS_TC_ROOT/logs/execute/lttng
$SS_TC_DEPS/lib64/liblttng-stonesoup-java.so:$SS_TC_DEPS/lib64/liblttng-ust-fork.so
org.apache.poi.hpbf.extractor.PublisherTextExtractor $SS_TC_ROOT/testData/good-03/ss-pub.pub
GOOD-03-STDOUT
good-03/output.txt
extract a .doc file
Environment variables
NONE
$SS_TC_ROOT/testData/milch_hypoderma.bin
i_exist_yo.txt
This is some text, it is in the file.
$SS_TC_ROOT/logs/execute/lttng
$SS_TC_DEPS/lib64/liblttng-stonesoup-java.so:$SS_TC_DEPS/lib64/liblttng-ust-fork.so
org.apache.poi.hwpf.extractor.WordExtractor $SS_TC_ROOT/testData/good-04/ss-word.doc
GOOD-04-STDOUT
good-04/output.txt
convert .xls file to html
Environment variables
NONE
$SS_TC_ROOT/testData/milch_hypoderma.bin
aFile.txt
One Fish, Two Fish, Red fish, Blue Fish.
$SS_TC_ROOT/logs/execute/lttng
$SS_TC_DEPS/lib64/liblttng-stonesoup-java.so:$SS_TC_DEPS/lib64/liblttng-ust-fork.so
org.apache.poi.hssf.converter.ExcelToHtmlConverter $SS_TC_ROOT/testData/good-05/ss-excel.xls $SS_TC_ROOT/testData/good-05/ss-excel.html
GOOD-05-STDOUT AND GOOD-05-FILE
good-05/output.txt
good-05/ss-excel.html
good-05/ss-excel.html
read title metadata from .xls file
Environment variables
NONE
$SS_TC_ROOT/testData/milch_hypoderma.bin
asdfasdfasdf.txt
asdfasdfasdf
asdfasdfasdf
asdfasdfasdf
$SS_TC_ROOT/logs/execute/lttng
$SS_TC_DEPS/lib64/liblttng-stonesoup-java.so:$SS_TC_DEPS/lib64/liblttng-ust-fork.so
org.apache.poi.hpsf.examples.ReadTitle good-06/ss-excel.xls
GOOD-06-STDOUT
good-06/output.txt
extract a password-protected .xls file
Environment variables
NONE
$SS_TC_ROOT/testData/milch_hypoderma.bin
i_exist_yo.txt
This is some text, it is in the file.
$SS_TC_ROOT/logs/execute/lttng
$SS_TC_DEPS/lib64/liblttng-stonesoup-java.so:$SS_TC_DEPS/lib64/liblttng-ust-fork.so
org.apache.poi.hssf.extractor.ExcelExtractorPassworded -i good-07/ss-excel-passworded.xls
GOOD-07-STDOUT
good-07/output.txt
extract text from a .vsd file (Visio)
Environment variables
NONE
$SS_TC_ROOT/testData/milch_hypoderma.bin
aFile.txt
One Fish, Two Fish, Red fish, Blue Fish.
$SS_TC_ROOT/logs/execute/lttng
$SS_TC_DEPS/lib64/liblttng-stonesoup-java.so:$SS_TC_DEPS/lib64/liblttng-ust-fork.so
org.apache.poi.hdgf.extractor.VisioTextExtractor good-08/BlkDia.vsd
GOOD-08-STDOUT
good-08/output.txt
extract a xls file
Environment variables
NONE
$SS_TC_ROOT/testData/milch_hypoderma.bin
asdfasdfasdf.txt
asdfasdfasdf
asdfasdfasdf
asdfasdfasdf
$SS_TC_ROOT/logs/execute/lttng
$SS_TC_DEPS/lib64/liblttng-stonesoup-java.so:$SS_TC_DEPS/lib64/liblttng-ust-fork.so
org.apache.poi.hssf.extractor.ExcelExtractor -i good-09/ss-excel.xls
GOOD-09-STDOUT
good-09/output.txt
extract a .xls file to csv
Environment variables
NONE
$SS_TC_ROOT/testData/milch_hypoderma.bin
i_exist_yo.txt
This is some text, it is in the file.
$SS_TC_ROOT/logs/execute/lttng
$SS_TC_DEPS/lib64/liblttng-stonesoup-java.so:$SS_TC_DEPS/lib64/liblttng-ust-fork.so
org.apache.poi.ss.examples.ToCSV good-10/ss-excel.xls good-10/
GOOD-10-FILE
good-10/ss-excel.csv
good-10/ss-excel.csv
Environment variables
DOS_UNCONTROLLED_EXIT
$SS_TC_ROOT/testData/milch_hypoderma.bin
this_file_does_not_exist_kthanksbai.txt
$SS_TC_ROOT/logs/execute/lttng
$SS_TC_DEPS/lib64/liblttng-stonesoup-java.so:$SS_TC_DEPS/lib64/liblttng-ust-fork.so
org.apache.poi.hdgf.extractor.VisioTextExtractor good-08/BlkDia.vsd
weakness_started_tsCcMM6SoY5dTlSVL04q AND ((NOT PERFORMER AND (runtime_exception_error_msgOMQwBrLhtW OR runtime_exception_I1DGnI7GBl) AND NOT timeout_fJE51HYZBM) or (PERFORMER AND NOT ((runtime_exception_error_msgOMQwBrLhtW OR runtime_exception_I1DGnI7GBl) OR timeout_fJE51HYZBM)))
(NOT PERFORMER AND (runtime_exception_error_msgOMQwBrLhtW OR runtime_exception_I1DGnI7GBl) AND NOT timeout_fJE51HYZBM) or (PERFORMER AND NOT ((runtime_exception_error_msgOMQwBrLhtW OR runtime_exception_I1DGnI7GBl) OR timeout_fJE51HYZBM))
DOES_NOT_RETURN
CONTROLLED_EXIT
CONTINUED_EXECUTION
logfile.txt
STONESOUP: Error in verifying absolute path
logfile.txt
java.lang.NullPointerException
None
stonesoup_trace:weakness_start
Environment variables
DOS_UNCONTROLLED_EXIT
$SS_TC_ROOT/testData/milch_hypoderma.bin
whatareyouevenlookingfor.txt
$SS_TC_ROOT/logs/execute/lttng
$SS_TC_DEPS/lib64/liblttng-stonesoup-java.so:$SS_TC_DEPS/lib64/liblttng-ust-fork.so
org.apache.poi.hpsf.examples.ReadTitle good-06/ss-excel.xls
weakness_started_PiC0sABgEZZAyqyeEb2m AND ((NOT PERFORMER AND (runtime_exception_error_msg9IzG9Kz4UJ OR runtime_exception_K2T4HBnfSC) AND NOT timeout_Om5errl6x0) or (PERFORMER AND NOT ((runtime_exception_error_msg9IzG9Kz4UJ OR runtime_exception_K2T4HBnfSC) OR timeout_Om5errl6x0)))
(NOT PERFORMER AND (runtime_exception_error_msg9IzG9Kz4UJ OR runtime_exception_K2T4HBnfSC) AND NOT timeout_Om5errl6x0) or (PERFORMER AND NOT ((runtime_exception_error_msg9IzG9Kz4UJ OR runtime_exception_K2T4HBnfSC) OR timeout_Om5errl6x0))
DOES_NOT_RETURN
CONTROLLED_EXIT
CONTINUED_EXECUTION
logfile.txt
STONESOUP: Error in verifying absolute path
logfile.txt
java.lang.NullPointerException
None
stonesoup_trace:weakness_start