Add test case

This commit is contained in:
Arthur Baars
2020-04-24 19:57:00 +02:00
parent 9742d3892d
commit 31e284a707
13 changed files with 658 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
import org.apache.commons.codec.Encoder;
import org.apache.commons.codec.Decoder;
import org.apache.commons.codec.BinaryEncoder;
import org.apache.commons.codec.BinaryDecoder;
import org.apache.commons.codec.StringEncoder;
import org.apache.commons.codec.StringDecoder;
class Test {
public static void taintSteps(
Decoder decoder,
Encoder encoder,
StringEncoder stringEncoder,
StringDecoder stringDecoder,
BinaryEncoder binEncoder,
BinaryDecoder binDecoder) throws Exception {
String string1 = "hello";
String string2 = "world";
byte [] bytes1 = new byte[0];
byte [] bytes2 = new byte[0];
Object obj1 = decoder.decode(string2);
Object obj2 = encoder.encode(bytes2);
string1 = stringDecoder.decode(string2);
string1 = stringEncoder.encode(string2);
bytes1 = binEncoder.encode(bytes2);
bytes1 = binDecoder.decode(bytes2);
}
}